Subversion Repositories SmartDukaan

Rev

Rev 37266 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37266 Rev 37729
Line 43... Line 43...
43
    EmailService emailService;
43
    EmailService emailService;
44
 
44
 
45
    @Autowired
45
    @Autowired
46
    LeadRepository leadRepository;
46
    LeadRepository leadRepository;
47
 
47
 
-
 
48
    @Autowired
-
 
49
    private com.spice.profitmandi.dao.service.lead.LeadCreationService leadCreationService;
-
 
50
 
48
    @Override
51
    @Override
49
    public void sentMailForTrialUser(TrialForm trialForm) throws Exception {
52
    public void sentMailForTrialUser(TrialForm trialForm) throws Exception {
50
        String body =
53
        String body =
51
                "Dear Team,<br><br>" +
54
                "Dear Team,<br><br>" +
52
                        "A new partner has registered via the SmartDukaan Partners App. Please review the details below and initiate the verification process immediately.<br><br>" +
55
                        "A new partner has registered via the SmartDukaan Partners App. Please review the details below and initiate the verification process immediately.<br><br>" +
Line 316... Line 319...
316
            lead.setStatus(LeadStatus.pending);
319
            lead.setStatus(LeadStatus.pending);
317
            lead.setColor("yellow");
320
            lead.setColor("yellow");
318
            lead.setCreatedBy("system");
321
            lead.setCreatedBy("system");
319
            lead.setCreatedTimestamp(LocalDateTime.now());
322
            lead.setCreatedTimestamp(LocalDateTime.now());
320
            lead.setUpdatedTimestamp(LocalDateTime.now());
323
            lead.setUpdatedTimestamp(LocalDateTime.now());
-
 
324
            // Unattended: a trial signup has no agent to offer an override to. A collision is
-
 
325
            // skipped and mailed to the Call Center desk rather than creating a second live lead.
321
            leadRepository.persist(lead);
326
            leadCreationService.createUnattended(lead);
322
            LOGGER.info("Trial-to-Lead created: leadId={} for trialMobile={}", lead.getId(), trialForm.getMobile());
327
            LOGGER.info("Trial-to-Lead created: leadId={} for trialMobile={}", lead.getId(), trialForm.getMobile());
323
        } catch (Exception e) {
328
        } catch (Exception e) {
324
            LOGGER.error("Failed to create Lead from Trial for mobile=" + trialForm.getMobile(), e);
329
            LOGGER.error("Failed to create Lead from Trial for mobile=" + trialForm.getMobile(), e);
325
        }
330
        }
326
 
331