| Line 52... |
Line 52... |
| 52 |
|
52 |
|
| 53 |
import com.google.gson.Gson;
|
53 |
import com.google.gson.Gson;
|
| 54 |
import com.mongodb.MongoClient;
|
54 |
import com.mongodb.MongoClient;
|
| 55 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
55 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
| 56 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
56 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| - |
|
57 |
import com.spice.profitmandi.common.model.CatalogIdModel;
|
| 57 |
import com.spice.profitmandi.common.model.CustomCurrentInventorySnapshot;
|
58 |
import com.spice.profitmandi.common.model.CustomCurrentInventorySnapshot;
|
| 58 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
59 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| 59 |
import com.spice.profitmandi.common.model.InventoryItemAgingModel;
|
60 |
import com.spice.profitmandi.common.model.InventoryItemAgingModel;
|
| 60 |
import com.spice.profitmandi.common.model.ItemFeatureDataModel;
|
61 |
import com.spice.profitmandi.common.model.ItemFeatureDataModel;
|
| 61 |
import com.spice.profitmandi.common.model.NotifyItemIdModel;
|
62 |
import com.spice.profitmandi.common.model.NotifyItemIdModel;
|
| Line 1071... |
Line 1072... |
| 1071 |
@RequestMapping(value = "/getProductInfo", method = RequestMethod.GET)
|
1072 |
@RequestMapping(value = "/getProductInfo", method = RequestMethod.GET)
|
| 1072 |
public String getProductInfo(HttpServletRequest request, long catalogId, Model model) throws Exception {
|
1073 |
public String getProductInfo(HttpServletRequest request, long catalogId, Model model) throws Exception {
|
| 1073 |
ContentPojo cp = mongoClient.getEntityById(catalogId);
|
1074 |
ContentPojo cp = mongoClient.getEntityById(catalogId);
|
| 1074 |
List<String> cps = cp.getKeySpecs();
|
1075 |
List<String> cps = cp.getKeySpecs();
|
| 1075 |
LOGGER.info("cp" + cp.getDefaultImageUrl());
|
1076 |
LOGGER.info("cp" + cp.getDefaultImageUrl());
|
| 1076 |
model.addAttribute("cp", cp);
|
1077 |
model.addAttribute("cp", cp);
|
| 1077 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
1078 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
| 1078 |
return "product-info";
|
1079 |
return "product-info";
|
| 1079 |
}
|
1080 |
}
|
| - |
|
1081 |
|
| - |
|
1082 |
@RequestMapping(value = "/getProductCompareInfo", method = RequestMethod.GET)
|
| - |
|
1083 |
public String getProductCompareInfo(HttpServletRequest request, @RequestParam List<Long> catalogId, Model model)
|
| - |
|
1084 |
throws Exception {
|
| - |
|
1085 |
List<ContentPojo> cps = new ArrayList<>();
|
| - |
|
1086 |
for (Long id : catalogId) {
|
| - |
|
1087 |
ContentPojo cp = mongoClient.getEntityById(id);
|
| - |
|
1088 |
cps.add(cp);
|
| - |
|
1089 |
}
|
| - |
|
1090 |
|
| - |
|
1091 |
|
| - |
|
1092 |
LOGGER.info("cps" + cps);
|
| - |
|
1093 |
model.addAttribute("cps", cps);
|
| - |
|
1094 |
return "product-compare";
|
| - |
|
1095 |
}
|
| 1080 |
}
|
1096 |
}
|
| 1081 |
|
1097 |
|