| Line 1427... |
Line 1427... |
| 1427 |
schemeService.activeSchemeByIds(schemes);
|
1427 |
schemeService.activeSchemeByIds(schemes);
|
| 1428 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
1428 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 1429 |
return "response";
|
1429 |
return "response";
|
| 1430 |
}
|
1430 |
}
|
| 1431 |
|
1431 |
|
| - |
|
1432 |
@RequestMapping(value = "/expireSchemeByIds", method = RequestMethod.PUT)
|
| - |
|
1433 |
public String expireSchemeByIds(@RequestParam(name = ProfitMandiConstants.SCHEME_ID) String schemeIds, @RequestParam(name = "offset", defaultValue = "0") int offset, @RequestParam(name = "limit", defaultValue = "10") int limit, Model model) throws Exception {
|
| - |
|
1434 |
List<Integer> ids = Arrays.stream(schemeIds.split(",")).map(String::trim).filter(s -> !s.isEmpty()).map(Integer::parseInt).collect(Collectors.toList());
|
| - |
|
1435 |
List<Scheme> schemes = schemeRepository.selectBySchemeIds(ids);
|
| - |
|
1436 |
schemeService.expireSchemeByIds(schemes);
|
| - |
|
1437 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| - |
|
1438 |
return "response";
|
| - |
|
1439 |
}
|
| - |
|
1440 |
|
| 1432 |
@RequestMapping(value = "/expireSchemeById", method = RequestMethod.PUT)
|
1441 |
@RequestMapping(value = "/expireSchemeById", method = RequestMethod.PUT)
|
| 1433 |
public String expireSchemeById(HttpServletRequest request,
|
1442 |
public String expireSchemeById(HttpServletRequest request,
|
| 1434 |
@RequestParam(name = ProfitMandiConstants.SCHEME_ID) int schemeId,
|
1443 |
@RequestParam(name = ProfitMandiConstants.SCHEME_ID) int schemeId,
|
| 1435 |
@RequestParam(name = ProfitMandiConstants.EXPIRE_TIMESTAMP) LocalDateTime expiryTimestamp, Model model)
|
1444 |
@RequestParam(name = ProfitMandiConstants.EXPIRE_TIMESTAMP) LocalDateTime expiryTimestamp, Model model)
|
| 1436 |
throws ProfitMandiBusinessException {
|
1445 |
throws ProfitMandiBusinessException {
|