Subversion Repositories SmartDukaan

Rev

Rev 30945 | Rev 30964 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30945 Rev 30963
Line 531... Line 531...
531
	@PostMapping(value = "/extendBilling")
531
	@PostMapping(value = "/extendBilling")
532
	public String extendBilling(HttpServletRequest request,
532
	public String extendBilling(HttpServletRequest request,
533
			@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
533
			@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
534
		FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
534
		FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
535
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
535
		LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
536
		if (Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com", "prakash.rai@smartdukaan.com",
536
		if (Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com", "amit.gupta@smartdukaan.com",
537
				"amit.gupta@smartdukaan.com").contains(loginDetails.getEmailId())) {
537
				"rahul.katyal@smartdukaan.com").contains(loginDetails.getEmailId())) {
538
			fofoStore.setGraceDate(LocalDate.now().plusDays(2));
538
			fofoStore.setGraceDate(LocalDate.now().plusDays(2));
539
			fofoStore.setGraceCount(fofoStore.getGraceCount() + 1);
539
			fofoStore.setGraceCount(fofoStore.getGraceCount() + 1);
540
			fofoStoreRepository.persist(fofoStore);
540
			fofoStoreRepository.persist(fofoStore);
541
			model.addAttribute("response", mvcResponseSender.createResponseString(fofoStore.getGraceCount()));
541
			model.addAttribute("response", mvcResponseSender.createResponseString(fofoStore.getGraceCount()));
542
		} else {
542
		} else {