| Line 60... |
Line 60... |
| 60 |
private static final Logger LOGGER = LogManager.getLogger(RetailerController.class);
|
60 |
private static final Logger LOGGER = LogManager.getLogger(RetailerController.class);
|
| 61 |
|
61 |
|
| 62 |
@Autowired
|
62 |
@Autowired
|
| 63 |
private RetailerService retailerService;
|
63 |
private RetailerService retailerService;
|
| 64 |
|
64 |
|
| - |
|
65 |
|
| 65 |
@Autowired
|
66 |
@Autowired
|
| 66 |
private RetailerRepository retailerRepository;
|
67 |
private RetailerRepository retailerRepository;
|
| 67 |
|
68 |
|
| 68 |
@Autowired
|
69 |
@Autowired
|
| 69 |
private PincodePartnerRepository PincodePartnerRepository;
|
70 |
private PincodePartnerRepository PincodePartnerRepository;
|
| Line 167... |
Line 168... |
| 167 |
@RequestMapping(value = "/retailerDetails", method = RequestMethod.PUT)
|
168 |
@RequestMapping(value = "/retailerDetails", method = RequestMethod.PUT)
|
| 168 |
public String updateRetailerDetails(HttpServletRequest request,
|
169 |
public String updateRetailerDetails(HttpServletRequest request,
|
| 169 |
@RequestBody UpdateRetailerRequest updateRetailerRequest, Model model) throws ProfitMandiBusinessException {
|
170 |
@RequestBody UpdateRetailerRequest updateRetailerRequest, Model model) throws ProfitMandiBusinessException {
|
| 170 |
LOGGER.info("Request Received at url {} with body {}", request.getRequestURI(), updateRetailerRequest);
|
171 |
LOGGER.info("Request Received at url {} with body {}", request.getRequestURI(), updateRetailerRequest);
|
| 171 |
Map<String, Object> map = retailerService.updateRetailerDetails(updateRetailerRequest);
|
172 |
Map<String, Object> map = retailerService.updateRetailerDetails(updateRetailerRequest);
|
| - |
|
173 |
//retailerService.up
|
| 172 |
|
174 |
|
| 173 |
model.addAllAttributes(map);
|
175 |
model.addAllAttributes(map);
|
| 174 |
model.addAttribute("counterSizes", CounterSize.values());
|
176 |
model.addAttribute("counterSizes", CounterSize.values());
|
| 175 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
177 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
| 176 |
LOGGER.info("warehouseMap", warehouseMap);
|
178 |
LOGGER.info("warehouseMap", warehouseMap);
|
| 177 |
model.addAttribute("warehouses", warehouseMap);
|
179 |
model.addAttribute("warehouses", warehouseMap);
|
| 178 |
model.addAttribute("fofoTypes", FofoType.values());
|
180 |
model.addAttribute("fofoTypes", FofoType.values());
|
| 179 |
return "retailer-details";
|
181 |
return "retailer-details";
|
| 180 |
}
|
182 |
}
|
| 181 |
|
183 |
|
| - |
|
184 |
@RequestMapping(value = "/retailer/update-email", method = RequestMethod.POST)
|
| - |
|
185 |
public String updateRetailerEmail(@RequestParam("newEmail") String newEmail, @RequestParam("fofoID") int fofoID) throws ProfitMandiBusinessException {
|
| - |
|
186 |
retailerService.updateRetailerEmail(fofoID, newEmail);
|
| - |
|
187 |
return "retailer-details";
|
| - |
|
188 |
}
|
| - |
|
189 |
|
| 182 |
@RequestMapping(value = "/retailerInfo", method = RequestMethod.GET)
|
190 |
@RequestMapping(value = "/retailerInfo", method = RequestMethod.GET)
|
| 183 |
public String retailerInfo(HttpServletRequest request) throws Exception {
|
191 |
public String retailerInfo(HttpServletRequest request) throws Exception {
|
| 184 |
return "retailer-info";
|
192 |
return "retailer-info";
|
| 185 |
}
|
193 |
}
|
| 186 |
|
194 |
|
| Line 581... |
Line 589... |
| 581 |
promoterInfo = promoterRepository.selectAllPromoterByFofoId(fofoId, offset, limit);
|
589 |
promoterInfo = promoterRepository.selectAllPromoterByFofoId(fofoId, offset, limit);
|
| 582 |
|
590 |
|
| 583 |
size = promoterRepository.selectPromoterCount(fofoId);
|
591 |
size = promoterRepository.selectPromoterCount(fofoId);
|
| 584 |
|
592 |
|
| 585 |
} else {
|
593 |
} else {
|
| - |
|
594 |
//rkb
|
| 586 |
promoterInfo = promoterRepository.selectAllPromoter(offset, limit);
|
595 |
promoterInfo = promoterRepository.selectAllPromoter(offset, limit);
|
| 587 |
|
596 |
|
| 588 |
size = promoterRepository.selectAllCount();
|
597 |
size = promoterRepository.selectAllCount();
|
| 589 |
|
598 |
|
| 590 |
}
|
599 |
}
|
| Line 1144... |
Line 1153... |
| 1144 |
@RequestMapping(value = "/getAllPartnerPincode", method = RequestMethod.GET)
|
1153 |
@RequestMapping(value = "/getAllPartnerPincode", method = RequestMethod.GET)
|
| 1145 |
public String getAllPartnerPincode(HttpServletRequest request, Model model) throws Exception {
|
1154 |
public String getAllPartnerPincode(HttpServletRequest request, Model model) throws Exception {
|
| 1146 |
return "add-partner-pincode";
|
1155 |
return "add-partner-pincode";
|
| 1147 |
}
|
1156 |
}
|
| 1148 |
|
1157 |
|
| - |
|
1158 |
|
| 1149 |
}
|
1159 |
}
|
| 1150 |
|
1160 |
|