| Line 333... |
Line 333... |
| 333 |
@PostMapping(value = "/deactivateStore")
|
333 |
@PostMapping(value = "/deactivateStore")
|
| 334 |
public String deActivateStore(HttpServletRequest request,
|
334 |
public String deActivateStore(HttpServletRequest request,
|
| 335 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
335 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
| 336 |
FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
|
336 |
FofoStore fofoStore = fofoStoreRepository.selectByRetailerId(fofoId);
|
| 337 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
337 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 338 |
if (!Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com")
|
338 |
if (!Arrays.asList("kamini.sharma@smartdukaan.com", "tarun.verma@smartdukaan.com","amit.gupta@smartdukaan.com")
|
| 339 |
.contains(loginDetails.getEmailId())) {
|
339 |
.contains(loginDetails.getEmailId())) {
|
| 340 |
throw new ProfitMandiBusinessException("Access Denied", "Unauthorised Access",
|
340 |
throw new ProfitMandiBusinessException("Access Denied", "Unauthorised Access",
|
| 341 |
"You are not authorise to deactivate retailer");
|
341 |
"You are not authorise to deactivate retailer");
|
| 342 |
}
|
342 |
}
|
| 343 |
fofoStore.setActive(false);
|
343 |
fofoStore.setActive(false);
|