| Line 355... |
Line 355... |
| 355 |
@PostMapping(value = "/extendBilling")
|
355 |
@PostMapping(value = "/extendBilling")
|
| 356 |
public String extendBilling(HttpServletRequest request,
|
356 |
public String extendBilling(HttpServletRequest request,
|
| 357 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
357 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
| 358 |
FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
|
358 |
FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
|
| 359 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
359 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 360 |
if (Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
360 |
if (Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com", "prakash.rai@smartdukaan.com").contains(loginDetails.getEmailId())) {
|
| 361 |
fofoStore.setGraceDate(LocalDate.now().plusDays(2));
|
361 |
fofoStore.setGraceDate(LocalDate.now().plusDays(2));
|
| 362 |
fofoStore.setGraceCount(fofoStore.getGraceCount() + 1);
|
362 |
fofoStore.setGraceCount(fofoStore.getGraceCount() + 1);
|
| 363 |
fofoStoreRepository.persist(fofoStore);
|
363 |
fofoStoreRepository.persist(fofoStore);
|
| 364 |
model.addAttribute("response", mvcResponseSender.createResponseString(fofoStore.getGraceCount()));
|
364 |
model.addAttribute("response", mvcResponseSender.createResponseString(fofoStore.getGraceCount()));
|
| 365 |
} else {
|
365 |
} else {
|