| Line 862... |
Line 862... |
| 862 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
862 |
SendNotificationModel sendNotificationModel = new SendNotificationModel();
|
| 863 |
sendNotificationModel.setCampaignName("Notify Partner");
|
863 |
sendNotificationModel.setCampaignName("Notify Partner");
|
| 864 |
sendNotificationModel.setMessage(message.getNotifyMessages());
|
864 |
sendNotificationModel.setMessage(message.getNotifyMessages());
|
| 865 |
sendNotificationModel.setType("url");
|
865 |
sendNotificationModel.setType("url");
|
| 866 |
sendNotificationModel.setTitle("Alert");
|
866 |
sendNotificationModel.setTitle("Alert");
|
| 867 |
sendNotificationModel.setUrl("http://app.smartdukaan.com/pages/home/notifyOrder");
|
867 |
sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifyOrder");
|
| 868 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(2));
|
868 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(2));
|
| 869 |
sendNotificationModel.setMessageType(MessageType.notification);
|
869 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 870 |
int userId = userAccountRepository.selectUserIdByRetailerId(order.getRetailerId());
|
870 |
int userId = userAccountRepository.selectUserIdByRetailerId(order.getRetailerId());
|
| 871 |
|
871 |
|
| 872 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
872 |
sendNotificationModel.setUserIds(Arrays.asList(userId));
|
| Line 1084... |
Line 1084... |
| 1084 |
public String getProductCompareInfo(HttpServletRequest request, @RequestParam List<Long> catalogIds, Model model)
|
1084 |
public String getProductCompareInfo(HttpServletRequest request, @RequestParam List<Long> catalogIds, Model model)
|
| 1085 |
throws Exception {
|
1085 |
throws Exception {
|
| 1086 |
List<ContentPojo> cps = new ArrayList<>();
|
1086 |
List<ContentPojo> cps = new ArrayList<>();
|
| 1087 |
for (Long cId : catalogIds) {
|
1087 |
for (Long cId : catalogIds) {
|
| 1088 |
ContentPojo cp = mongoClient.getEntityById(cId);
|
1088 |
ContentPojo cp = mongoClient.getEntityById(cId);
|
| 1089 |
if(cp.getName()==null) {
|
1089 |
if (cp.getName() == null) {
|
| 1090 |
cp.setName(itemRepository.selectAllByCatalogItemId(cId.intValue()).get(0).getItemDescriptionNoColor());
|
1090 |
cp.setName(itemRepository.selectAllByCatalogItemId(cId.intValue()).get(0).getItemDescriptionNoColor());
|
| 1091 |
}
|
1091 |
}
|
| 1092 |
cps.add(cp);
|
1092 |
cps.add(cp);
|
| 1093 |
}
|
1093 |
}
|
| 1094 |
|
1094 |
|
| 1095 |
List<Map<String, String>> entityList = new ArrayList<>();
|
1095 |
List<Map<String, String>> entityList = new ArrayList<>();
|
| 1096 |
for(ContentPojo cp : cps) {
|
1096 |
for (ContentPojo cp : cps) {
|
| 1097 |
Map<String, String> specsMap = new HashMap<>();
|
1097 |
Map<String, String> specsMap = new HashMap<>();
|
| 1098 |
for(SpecificationGroup sg : cp.getDetailedSpecs()) {
|
1098 |
for (SpecificationGroup sg : cp.getDetailedSpecs()) {
|
| 1099 |
String title = sg.getTitle();
|
1099 |
String title = sg.getTitle();
|
| 1100 |
for(Specification s : sg.getSpecs()) {
|
1100 |
for (Specification s : sg.getSpecs()) {
|
| 1101 |
String key = title + s.getName();
|
1101 |
String key = title + s.getName();
|
| 1102 |
specsMap.put(key, String.join(", ", s.getValues()));
|
1102 |
specsMap.put(key, String.join(", ", s.getValues()));
|
| 1103 |
}
|
1103 |
}
|
| 1104 |
}
|
1104 |
}
|
| 1105 |
entityList.add(specsMap);
|
1105 |
entityList.add(specsMap);
|
| 1106 |
}
|
1106 |
}
|
| 1107 |
|
1107 |
|
| 1108 |
LOGGER.info("cps" + cps);
|
1108 |
LOGGER.info("cps" + cps);
|
| 1109 |
model.addAttribute("cps", cps);
|
1109 |
model.addAttribute("cps", cps);
|
| 1110 |
model.addAttribute("catalogIds", gson.toJson(catalogIds,List.class));
|
1110 |
model.addAttribute("catalogIds", gson.toJson(catalogIds, List.class));
|
| 1111 |
model.addAttribute("entityList", entityList);
|
1111 |
model.addAttribute("entityList", entityList);
|
| 1112 |
return "product-compare";
|
1112 |
return "product-compare";
|
| 1113 |
}
|
1113 |
}
|
| 1114 |
}
|
1114 |
}
|
| 1115 |
|
1115 |
|