| Line 54... |
Line 54... |
| 54 |
import com.spice.profitmandi.dao.entity.dtr.Retailer;
|
54 |
import com.spice.profitmandi.dao.entity.dtr.Retailer;
|
| 55 |
import com.spice.profitmandi.dao.entity.dtr.RetailerBlockBrands;
|
55 |
import com.spice.profitmandi.dao.entity.dtr.RetailerBlockBrands;
|
| 56 |
import com.spice.profitmandi.dao.entity.dtr.RetailerBrandsLimit;
|
56 |
import com.spice.profitmandi.dao.entity.dtr.RetailerBrandsLimit;
|
| 57 |
import com.spice.profitmandi.dao.entity.dtr.Shop;
|
57 |
import com.spice.profitmandi.dao.entity.dtr.Shop;
|
| 58 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
58 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| - |
|
59 |
import com.spice.profitmandi.dao.entity.fofo.PartnerOnBoardingPanel;
|
| 59 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
60 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
| 60 |
import com.spice.profitmandi.dao.entity.fofo.PartnerTypeChange;
|
61 |
import com.spice.profitmandi.dao.entity.fofo.PartnerTypeChange;
|
| 61 |
import com.spice.profitmandi.dao.entity.fofo.PincodePartner;
|
62 |
import com.spice.profitmandi.dao.entity.fofo.PincodePartner;
|
| 62 |
import com.spice.profitmandi.dao.entity.user.Location;
|
63 |
import com.spice.profitmandi.dao.entity.user.Location;
|
| 63 |
import com.spice.profitmandi.dao.entity.user.Promoter;
|
64 |
import com.spice.profitmandi.dao.entity.user.Promoter;
|
| Line 68... |
Line 69... |
| 68 |
import com.spice.profitmandi.dao.repository.cs.RetailerBrandsLimitService;
|
69 |
import com.spice.profitmandi.dao.repository.cs.RetailerBrandsLimitService;
|
| 69 |
import com.spice.profitmandi.dao.repository.dtr.BrandLimitRepository;
|
70 |
import com.spice.profitmandi.dao.repository.dtr.BrandLimitRepository;
|
| 70 |
import com.spice.profitmandi.dao.repository.dtr.DocumentRepository;
|
71 |
import com.spice.profitmandi.dao.repository.dtr.DocumentRepository;
|
| 71 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
72 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| 72 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
73 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
| - |
|
74 |
import com.spice.profitmandi.dao.repository.dtr.PartnerOnBoardingPanelRepository;
|
| 73 |
import com.spice.profitmandi.dao.repository.dtr.RetailerBlockBrandsRepository;
|
75 |
import com.spice.profitmandi.dao.repository.dtr.RetailerBlockBrandsRepository;
|
| 74 |
import com.spice.profitmandi.dao.repository.dtr.RetailerBrandsLimitRepository;
|
76 |
import com.spice.profitmandi.dao.repository.dtr.RetailerBrandsLimitRepository;
|
| 75 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
77 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
| 76 |
import com.spice.profitmandi.dao.repository.dtr.ShopRepository;
|
78 |
import com.spice.profitmandi.dao.repository.dtr.ShopRepository;
|
| 77 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeRepository;
|
79 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeRepository;
|
| Line 81... |
Line 83... |
| 81 |
import com.spice.profitmandi.dao.repository.user.PromoterRepository;
|
83 |
import com.spice.profitmandi.dao.repository.user.PromoterRepository;
|
| 82 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
84 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
| 83 |
import com.spice.profitmandi.service.PartnerInvestmentService;
|
85 |
import com.spice.profitmandi.service.PartnerInvestmentService;
|
| 84 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
86 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
| 85 |
import com.spice.profitmandi.service.user.RetailerService;
|
87 |
import com.spice.profitmandi.service.user.RetailerService;
|
| - |
|
88 |
import com.spice.profitmandi.service.user.StoreTimelineTatService;
|
| 86 |
import com.spice.profitmandi.web.model.LoginDetails;
|
89 |
import com.spice.profitmandi.web.model.LoginDetails;
|
| 87 |
import com.spice.profitmandi.web.util.CookiesProcessor;
|
90 |
import com.spice.profitmandi.web.util.CookiesProcessor;
|
| 88 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
91 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
| 89 |
|
92 |
|
| 90 |
@Controller
|
93 |
@Controller
|
| Line 161... |
Line 164... |
| 161 |
private PartnerTypeChangeService partnerTypeChangeService;
|
164 |
private PartnerTypeChangeService partnerTypeChangeService;
|
| 162 |
|
165 |
|
| 163 |
@Autowired
|
166 |
@Autowired
|
| 164 |
private PartnerTypeChangeRepository partnerTypeChangeRepository;
|
167 |
private PartnerTypeChangeRepository partnerTypeChangeRepository;
|
| 165 |
|
168 |
|
| - |
|
169 |
@Autowired
|
| - |
|
170 |
PartnerOnBoardingPanelRepository partnerOnBoardingPanelRepository;
|
| - |
|
171 |
|
| - |
|
172 |
@Autowired
|
| - |
|
173 |
private StoreTimelineTatService storeTimelineTatService;
|
| - |
|
174 |
|
| 166 |
@RequestMapping(value = "/retailerDetails", method = RequestMethod.GET)
|
175 |
@RequestMapping(value = "/retailerDetails", method = RequestMethod.GET)
|
| 167 |
public String retailerInfoByEmailIdOrMobileNumber(HttpServletRequest request,
|
176 |
public String retailerInfoByEmailIdOrMobileNumber(HttpServletRequest request,
|
| 168 |
@RequestParam(name = ProfitMandiConstants.EMAIL_ID_OR_MOBILE_NUMBER) String emailIdOrMobileNumber,
|
177 |
@RequestParam(name = ProfitMandiConstants.EMAIL_ID_OR_MOBILE_NUMBER) String emailIdOrMobileNumber,
|
| 169 |
Model model) throws ProfitMandiBusinessException {
|
178 |
Model model) throws ProfitMandiBusinessException {
|
| 170 |
LOGGER.info("Request Received at url {} with emailIdOrMobileNumber {}", request.getRequestURI(),
|
179 |
LOGGER.info("Request Received at url {} with emailIdOrMobileNumber {}", request.getRequestURI(),
|
| Line 621... |
Line 630... |
| 621 |
if (promoter == null) {
|
630 |
if (promoter == null) {
|
| 622 |
promoter = new Promoter();
|
631 |
promoter = new Promoter();
|
| 623 |
promoter.setBrand(promoterdetailModel.getBrand());
|
632 |
promoter.setBrand(promoterdetailModel.getBrand());
|
| 624 |
promoter.setRetailerId(promoterdetailModel.getRetailerId());
|
633 |
promoter.setRetailerId(promoterdetailModel.getRetailerId());
|
| 625 |
promoter.setCreatedTimestamp(LocalDateTime.now());
|
634 |
promoter.setCreatedTimestamp(LocalDateTime.now());
|
| - |
|
635 |
promoterRepository.persist(promoter);
|
| - |
|
636 |
|
| - |
|
637 |
List<Promoter> promoters = promoterRepository.selectAllByRetailer(promoterdetailModel.getRetailerId());
|
| - |
|
638 |
if (!promoters.isEmpty()) {
|
| - |
|
639 |
FofoStore fs = fofoStoreRepository.selectByRetailerId(promoterdetailModel.getId());
|
| - |
|
640 |
PartnerOnBoardingPanel pobp = partnerOnBoardingPanelRepository.selectByCode(fs.getCode());
|
| - |
|
641 |
if (pobp != null) {
|
| - |
|
642 |
storeTimelineTatService.promoterComplete(pobp.getId());
|
| - |
|
643 |
}
|
| - |
|
644 |
}
|
| 626 |
|
645 |
|
| 627 |
}
|
646 |
}
|
| 628 |
promoter.setName(promoterdetailModel.getName());
|
647 |
promoter.setName(promoterdetailModel.getName());
|
| 629 |
promoter.setEmail(promoterdetailModel.getEmail());
|
648 |
promoter.setEmail(promoterdetailModel.getEmail());
|
| 630 |
promoter.setMobile(promoterdetailModel.getMobile());
|
649 |
promoter.setMobile(promoterdetailModel.getMobile());
|
| 631 |
promoter.setSdPortalAccess(promoterdetailModel.isSdPortalAccess());
|
650 |
promoter.setSdPortalAccess(promoterdetailModel.isSdPortalAccess());
|
| 632 |
promoter.setStatus(promoterdetailModel.isStatus());
|
651 |
promoter.setStatus(promoterdetailModel.isStatus());
|
| 633 |
LOGGER.info("sdport" + promoterdetailModel.isStatus());
|
652 |
LOGGER.info("sdport" + promoterdetailModel.isStatus());
|
| 634 |
promoterRepository.persist(promoter);
|
- |
|
| 635 |
|
653 |
|
| 636 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
654 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
| 637 |
|
655 |
|
| 638 |
return "response";
|
656 |
return "response";
|
| 639 |
|
657 |
|