| Line 388... |
Line 388... |
| 388 |
|
388 |
|
| 389 |
@RequestMapping(value = "/offer/process/{offerId}", method = RequestMethod.GET)
|
389 |
@RequestMapping(value = "/offer/process/{offerId}", method = RequestMethod.GET)
|
| 390 |
public ResponseEntity<?> processOfferRequest(HttpServletRequest request, @PathVariable int offerId, Model model)
|
390 |
public ResponseEntity<?> processOfferRequest(HttpServletRequest request, @PathVariable int offerId, Model model)
|
| 391 |
throws Exception {
|
391 |
throws Exception {
|
| 392 |
CreateOfferRequest createOfferRequest = offerService.getOffer(0, offerId);
|
392 |
CreateOfferRequest createOfferRequest = offerService.getOffer(0, offerId);
|
| - |
|
393 |
if (!createOfferRequest.isActive()) {
|
| - |
|
394 |
throw new ProfitMandiBusinessException("Offer not active", "Offer not active", "Offer not active");
|
| - |
|
395 |
}
|
| 393 |
if (createOfferRequest.getSchemeType().equals(OfferSchemeType.SELLIN)) {
|
396 |
if (createOfferRequest.getSchemeType().equals(OfferSchemeType.SELLIN)) {
|
| 394 |
offerRepository.processSellin(createOfferRequest);
|
397 |
offerRepository.processSellin(createOfferRequest);
|
| 395 |
} else if (createOfferRequest.getSchemeType().equals(OfferSchemeType.ACTIVATION)) {
|
398 |
} else if (createOfferRequest.getSchemeType().equals(OfferSchemeType.ACTIVATION)) {
|
| 396 |
offerRepository.processActivationtOffer(createOfferRequest);
|
399 |
offerRepository.processActivationtOffer(createOfferRequest);
|
| 397 |
}
|
400 |
}
|