Subversion Repositories SmartDukaan

Rev

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

Rev 34625 Rev 34626
Line 189... Line 189...
189
        LOGGER.info("CreateRefferalRequest - " + createRefferalRequest);
189
        LOGGER.info("CreateRefferalRequest - " + createRefferalRequest);
190
        if (createRefferalRequest.getOutletName() == null || createRefferalRequest.getPotential() == 0) {
190
        if (createRefferalRequest.getOutletName() == null || createRefferalRequest.getPotential() == 0) {
191
            throw new Exception("Outlet should not be empty and potential shoul be greator > 0");
191
            throw new Exception("Outlet should not be empty and potential shoul be greator > 0");
192
        }
192
        }
193
                 List<Lead> leadDetail = leadRepository.selectByMobileNumber(createRefferalRequest.getMobile());
193
                 List<Lead> leadDetail = leadRepository.selectByMobileNumber(createRefferalRequest.getMobile());
194
        AuthUser authUser1 = authRepository.selectById(leadDetail.get(0).getAssignTo());
-
 
195
        LOGGER.info("Lead Details {}", leadDetail);
194
        LOGGER.info("Lead Details {}", leadDetail);
196
        if(!leadDetail.isEmpty()){
195
        if(!leadDetail.isEmpty()){
-
 
196
            AuthUser authUser1 = authRepository.selectById(leadDetail.get(0).getAssignTo());
197
           return responseSender.ok(" Duplicate Entry: Lead already exists, created by "+ leadDetail.get(0).getCreatedBy()+ " on " + FormattingUtils.format(leadDetail.get(0).getCreatedTimestamp())+ "assigned to " + authUser1.getFullName() );
197
           return responseSender.ok(" Duplicate Entry: Lead already exists, created by "+ leadDetail.get(0).getCreatedBy()+ " on " + FormattingUtils.format(leadDetail.get(0).getCreatedTimestamp())+ "assigned to " + authUser1.getFullName() );
198
 
198
 
199
        }
199
        }
200
 
200
 
201
        Lead lead = new Lead();
201
        Lead lead = new Lead();