| Line 333... |
Line 333... |
| 333 |
|
333 |
|
| 334 |
return "store";
|
334 |
return "store";
|
| 335 |
|
335 |
|
| 336 |
}
|
336 |
}
|
| 337 |
|
337 |
|
| - |
|
338 |
private static final List<String> CHANGE_PARTNER_CATEGORY_PERMISSIONS = Arrays.asList("tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com", "shankar.mushra@smartdukaan.com");
|
| - |
|
339 |
|
| 338 |
@RequestMapping(value = "/getPartnerinfo")
|
340 |
@RequestMapping(value = "/getPartnerinfo")
|
| 339 |
public String getPartnerinfo(HttpServletRequest request, @RequestBody SelectStorePartnerInfo selectStorePartnerInfo,
|
341 |
public String getPartnerinfo(HttpServletRequest request, @RequestBody SelectStorePartnerInfo selectStorePartnerInfo,
|
| 340 |
Model model) throws ProfitMandiBusinessException {
|
342 |
Model model) throws ProfitMandiBusinessException {
|
| 341 |
|
- |
|
| - |
|
343 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 342 |
LOGGER.info("selectStorePartnerInfo" + selectStorePartnerInfo.getUserIds());
|
344 |
LOGGER.info("selectStorePartnerInfo" + selectStorePartnerInfo.getUserIds());
|
| 343 |
List<FofoStore> fofoStores = fofoStoreRepository.selectByRetailerIds(selectStorePartnerInfo.getUserIds());
|
345 |
List<FofoStore> fofoStores = fofoStoreRepository.selectByRetailerIds(selectStorePartnerInfo.getUserIds());
|
| 344 |
LOGGER.info("fofoStoresInfo" + fofoStores);
|
346 |
LOGGER.info("fofoStoresInfo" + fofoStores);
|
| 345 |
Map<Integer, Boolean> investments = new HashMap<>();
|
347 |
Map<Integer, Boolean> investments = new HashMap<>();
|
| 346 |
|
348 |
|
| Line 365... |
Line 367... |
| 365 |
|
367 |
|
| 366 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getFofoRetailers(false);
|
368 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getFofoRetailers(false);
|
| 367 |
model.addAttribute("fofoStores", fofoStores);
|
369 |
model.addAttribute("fofoStores", fofoStores);
|
| 368 |
model.addAttribute("investments", investments);
|
370 |
model.addAttribute("investments", investments);
|
| 369 |
model.addAttribute("customRetailers", customRetailers);
|
371 |
model.addAttribute("customRetailers", customRetailers);
|
| - |
|
372 |
boolean canChangeCategory = CHANGE_PARTNER_CATEGORY_PERMISSIONS.contains(loginDetails.getEmailId());
|
| - |
|
373 |
model.addAttribute("canChangeCategory", canChangeCategory);
|
| 370 |
|
374 |
|
| 371 |
return "store-investment";
|
375 |
return "store-investment";
|
| 372 |
|
376 |
|
| 373 |
}
|
377 |
}
|
| 374 |
|
378 |
|
| 375 |
@GetMapping(value = "/getAllStores")
|
379 |
@GetMapping(value = "/getAllStores")
|
| 376 |
public String getAllStores(HttpServletRequest request, Model model) {
|
380 |
public String getAllStores(HttpServletRequest request, Model model) throws Exception {
|
| 377 |
|
381 |
|
| 378 |
List<FofoStore> fofoStores = fofoStoreRepository.selectAll().stream().filter(x -> x.isActive())
|
382 |
List<FofoStore> fofoStores = fofoStoreRepository.selectAll().stream().filter(x -> x.isActive())
|
| 379 |
.collect(Collectors.toList());
|
383 |
.collect(Collectors.toList());
|
| 380 |
Map<Integer, Boolean> investments = new HashMap<>();
|
384 |
Map<Integer, Boolean> investments = new HashMap<>();
|
| 381 |
|
385 |
|
| Line 401... |
Line 405... |
| 401 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getFofoRetailers(false);
|
405 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getFofoRetailers(false);
|
| 402 |
model.addAttribute("fofoStores", fofoStores);
|
406 |
model.addAttribute("fofoStores", fofoStores);
|
| 403 |
model.addAttribute("investments", investments);
|
407 |
model.addAttribute("investments", investments);
|
| 404 |
model.addAttribute("customRetailers", customRetailers);
|
408 |
model.addAttribute("customRetailers", customRetailers);
|
| 405 |
|
409 |
|
| - |
|
410 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| - |
|
411 |
boolean canChangeCategory = CHANGE_PARTNER_CATEGORY_PERMISSIONS.contains(loginDetails.getEmailId());
|
| - |
|
412 |
model.addAttribute("canChangeCategory", canChangeCategory);
|
| - |
|
413 |
|
| 406 |
return "store-investment";
|
414 |
return "store-investment";
|
| 407 |
|
415 |
|
| 408 |
}
|
416 |
}
|
| 409 |
|
417 |
|
| 410 |
@GetMapping(value = "/getPartnerCategory")
|
418 |
@GetMapping(value = "/getPartnerCategory")
|