| Line 510... |
Line 510... |
| 510 |
|
510 |
|
| 511 |
@GetMapping(value = "/getAllInactiveStores")
|
511 |
@GetMapping(value = "/getAllInactiveStores")
|
| 512 |
public String getInactiveStores(HttpServletRequest request, Model model) {
|
512 |
public String getInactiveStores(HttpServletRequest request, Model model) {
|
| 513 |
List<FofoStore> inActiveFofoStores = fofoStoreRepository.selectInActiveStore();
|
513 |
List<FofoStore> inActiveFofoStores = fofoStoreRepository.selectInActiveStore();
|
| 514 |
|
514 |
|
| - |
|
515 |
LOGGER.info("inActiveFofoStores {}", inActiveFofoStores);
|
| 515 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
|
516 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
|
| 516 |
|
517 |
|
| - |
|
518 |
List<Integer> fofoIds = inActiveFofoStores.stream().map(x -> x.getId()).collect(Collectors.toList());
|
| - |
|
519 |
|
| 517 |
Map<Integer, CustomRetailer> customRetailers = inActiveFofoStores.stream().map(x -> customRetailerMap.get(x))
|
520 |
Map<Integer, CustomRetailer> customRetailers = fofoIds.stream().map(x -> customRetailerMap.get(x))
|
| 518 |
.filter(x -> x != null).collect(Collectors.toList()).stream()
|
521 |
.filter(x -> x != null).collect(Collectors.toList()).stream()
|
| 519 |
.collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
|
522 |
.collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
|
| - |
|
523 |
LOGGER.info("customRetailers {}", customRetailers);
|
| 520 |
|
524 |
|
| 521 |
model.addAttribute("inActiveFofoStores", inActiveFofoStores);
|
525 |
model.addAttribute("inActiveFofoStores", inActiveFofoStores);
|
| 522 |
model.addAttribute("customRetailers", customRetailers);
|
526 |
model.addAttribute("customRetailers", customRetailers);
|
| 523 |
return "inactive-stores";
|
527 |
return "inactive-stores";
|
| 524 |
}
|
528 |
}
|