| Line 121... |
Line 121... |
| 121 |
LOGGER.info("Request Received at url {} with emailIdOrMobileNumber {}", request.getRequestURI(),
|
121 |
LOGGER.info("Request Received at url {} with emailIdOrMobileNumber {}", request.getRequestURI(),
|
| 122 |
emailIdOrMobileNumber);
|
122 |
emailIdOrMobileNumber);
|
| 123 |
Map<String, Object> map = retailerService.getByEmailIdOrMobileNumber(emailIdOrMobileNumber);
|
123 |
Map<String, Object> map = retailerService.getByEmailIdOrMobileNumber(emailIdOrMobileNumber);
|
| 124 |
model.addAllAttributes(map);
|
124 |
model.addAllAttributes(map);
|
| 125 |
model.addAttribute("counterSizes", CounterSize.values());
|
125 |
model.addAttribute("counterSizes", CounterSize.values());
|
| - |
|
126 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
| - |
|
127 |
LOGGER.info("warehouseMap", warehouseMap);
|
| - |
|
128 |
model.addAttribute("warehouses", warehouseMap);
|
| 126 |
if (map.containsKey("retailer")) {
|
129 |
if (map.containsKey("retailer")) {
|
| 127 |
Retailer retailer = (Retailer) map.get("retailer");
|
130 |
Retailer retailer = (Retailer) map.get("retailer");
|
| 128 |
User user = userRepository.selectById(retailer.getId());
|
131 |
User user = userRepository.selectById(retailer.getId());
|
| 129 |
if (user.getLocation() != null) {
|
132 |
if (user.getLocation() != null) {
|
| 130 |
Location location = locationRepository.selectById(user.getLocation());
|
133 |
Location location = locationRepository.selectById(user.getLocation());
|
| Line 140... |
Line 143... |
| 140 |
@RequestBody UpdateRetailerRequest updateRetailerRequest, Model model) throws ProfitMandiBusinessException {
|
143 |
@RequestBody UpdateRetailerRequest updateRetailerRequest, Model model) throws ProfitMandiBusinessException {
|
| 141 |
LOGGER.info("Request Received at url {} with body {}", request.getRequestURI(), updateRetailerRequest);
|
144 |
LOGGER.info("Request Received at url {} with body {}", request.getRequestURI(), updateRetailerRequest);
|
| 142 |
Map<String, Object> map = retailerService.updateRetailerDetails(updateRetailerRequest);
|
145 |
Map<String, Object> map = retailerService.updateRetailerDetails(updateRetailerRequest);
|
| 143 |
model.addAllAttributes(map);
|
146 |
model.addAllAttributes(map);
|
| 144 |
model.addAttribute("counterSizes", CounterSize.values());
|
147 |
model.addAttribute("counterSizes", CounterSize.values());
|
| - |
|
148 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
| - |
|
149 |
LOGGER.info("warehouseMap", warehouseMap);
|
| - |
|
150 |
model.addAttribute("warehouses", warehouseMap);
|
| 145 |
return "retailer-details";
|
151 |
return "retailer-details";
|
| 146 |
}
|
152 |
}
|
| 147 |
|
153 |
|
| 148 |
@RequestMapping(value = "/retailerInfo", method = RequestMethod.GET)
|
154 |
@RequestMapping(value = "/retailerInfo", method = RequestMethod.GET)
|
| 149 |
public String retailerInfo(HttpServletRequest request) throws Exception {
|
155 |
public String retailerInfo(HttpServletRequest request) throws Exception {
|