| Line 357... |
Line 357... |
| 357 |
return "response";
|
357 |
return "response";
|
| 358 |
}
|
358 |
}
|
| 359 |
|
359 |
|
| 360 |
// Generate (only) the IMEI rows for a flagged price hike so they can be reviewed before
|
360 |
// Generate (only) the IMEI rows for a flagged price hike so they can be reviewed before
|
| 361 |
// processing. Does NOT debit. Idempotent: priceDropStatus creates rows only when none exist.
|
361 |
// processing. Does NOT debit. Idempotent: priceDropStatus creates rows only when none exist.
|
| 362 |
@RequestMapping(value = "/priceHike/generateImeis/{priceDropId}", method = RequestMethod.POST)
|
362 |
@RequestMapping(value = "/priceHike/generateImeis/{priceDropId}", method = RequestMethod.GET)
|
| 363 |
public String generateHikeImeis(HttpServletRequest request, @PathVariable int priceDropId, Model model)
|
363 |
public String generateHikeImeis(HttpServletRequest request, @PathVariable int priceDropId, Model model)
|
| 364 |
throws Exception {
|
364 |
throws Exception {
|
| 365 |
PriceDrop priceDrop = priceDropRepository.selectById(priceDropId);
|
365 |
PriceDrop priceDrop = priceDropRepository.selectById(priceDropId);
|
| 366 |
if (priceDrop.getAmount() >= 0 || !priceDrop.isDeductOnHike()) {
|
366 |
if (priceDrop.getAmount() >= 0 || !priceDrop.isDeductOnHike()) {
|
| 367 |
throw new ProfitMandiBusinessException("Generate hike IMEIs", String.valueOf(priceDropId),
|
367 |
throw new ProfitMandiBusinessException("Generate hike IMEIs", String.valueOf(priceDropId),
|