| Line 363... |
Line 363... |
| 363 |
@PostMapping(value = "/extendBilling")
|
363 |
@PostMapping(value = "/extendBilling")
|
| 364 |
public String extendBilling(HttpServletRequest request,
|
364 |
public String extendBilling(HttpServletRequest request,
|
| 365 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
365 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
| 366 |
FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
|
366 |
FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
|
| 367 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
367 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 368 |
if (Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com", "prakash.rai@smartdukaan.com", "amit.gupta@shop2020.in")
|
368 |
if (Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com", "prakash.rai@smartdukaan.com", "amit.gupta@smartdukaan.com")
|
| 369 |
.contains(loginDetails.getEmailId())) {
|
369 |
.contains(loginDetails.getEmailId())) {
|
| 370 |
fofoStore.setGraceDate(LocalDate.now().plusDays(2));
|
370 |
fofoStore.setGraceDate(LocalDate.now().plusDays(2));
|
| 371 |
fofoStore.setGraceCount(fofoStore.getGraceCount() + 1);
|
371 |
fofoStore.setGraceCount(fofoStore.getGraceCount() + 1);
|
| 372 |
fofoStoreRepository.persist(fofoStore);
|
372 |
fofoStoreRepository.persist(fofoStore);
|
| 373 |
model.addAttribute("response", mvcResponseSender.createResponseString(fofoStore.getGraceCount()));
|
373 |
model.addAttribute("response", mvcResponseSender.createResponseString(fofoStore.getGraceCount()));
|