| Line 247... |
Line 247... |
| 247 |
@RequestMapping(value = "/resetHardLimit", method = RequestMethod.PUT)
|
247 |
@RequestMapping(value = "/resetHardLimit", method = RequestMethod.PUT)
|
| 248 |
public String resetHardLimit(HttpServletRequest request, @RequestParam int id, Model model) throws Exception {
|
248 |
public String resetHardLimit(HttpServletRequest request, @RequestParam int id, Model model) throws Exception {
|
| 249 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
249 |
LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
|
| 250 |
if (loginDetails.getEmailId().equals("tarun.verma@smartdukaan.com")) {
|
250 |
if (loginDetails.getEmailId().equals("tarun.verma@smartdukaan.com")) {
|
| 251 |
SDCreditRequirement sdCreditRequirement = sdCreditRequirementRepository.selectById(id);
|
251 |
SDCreditRequirement sdCreditRequirement = sdCreditRequirementRepository.selectById(id);
|
| 252 |
if (sdCreditRequirement.isHardLimit()) {
|
- |
|
| 253 |
sdCreditRequirement.setHardLimit(false);
|
252 |
sdCreditRequirement.setHardLimit(false);
|
| 254 |
} else {
|
- |
|
| 255 |
sdCreditRequirement.setHardLimit(true);
|
- |
|
| 256 |
}
|
- |
|
| 257 |
}
|
253 |
}
|
| 258 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
254 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 259 |
return "response";
|
255 |
return "response";
|
| 260 |
}
|
256 |
}
|
| 261 |
|
257 |
|