| Line 25... |
Line 25... |
| 25 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
25 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 26 |
import com.spice.profitmandi.service.NotificationService;
|
26 |
import com.spice.profitmandi.service.NotificationService;
|
| 27 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
27 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
| 28 |
import com.spice.profitmandi.service.catalog.BrandsService;
|
28 |
import com.spice.profitmandi.service.catalog.BrandsService;
|
| 29 |
import com.spice.profitmandi.service.offers.ItemCriteria;
|
29 |
import com.spice.profitmandi.service.offers.ItemCriteria;
|
| - |
|
30 |
import com.spice.profitmandi.service.offers.OfferBatchService;
|
| 30 |
import com.spice.profitmandi.service.offers.OfferService;
|
31 |
import com.spice.profitmandi.service.offers.OfferService;
|
| 31 |
import com.spice.profitmandi.service.offers.PartnerCriteria;
|
32 |
import com.spice.profitmandi.service.offers.PartnerCriteria;
|
| 32 |
import com.spice.profitmandi.service.offers.TodayOfferService;
|
33 |
import com.spice.profitmandi.service.offers.TodayOfferService;
|
| 33 |
import com.spice.profitmandi.service.user.RetailerService;
|
34 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 34 |
import com.spice.profitmandi.web.model.LoginDetails;
|
35 |
import com.spice.profitmandi.web.model.LoginDetails;
|
| Line 103... |
Line 104... |
| 103 |
private CookiesProcessor cookiesProcessor;
|
104 |
private CookiesProcessor cookiesProcessor;
|
| 104 |
@Autowired
|
105 |
@Autowired
|
| 105 |
private OfferService offerService;
|
106 |
private OfferService offerService;
|
| 106 |
|
107 |
|
| 107 |
@Autowired
|
108 |
@Autowired
|
| - |
|
109 |
private OfferBatchService offerBatchService;
|
| - |
|
110 |
|
| - |
|
111 |
@Autowired
|
| 108 |
private Gson gson;
|
112 |
private Gson gson;
|
| 109 |
|
113 |
|
| 110 |
@Autowired
|
114 |
@Autowired
|
| 111 |
BrandsService brandsService;
|
115 |
BrandsService brandsService;
|
| 112 |
|
116 |
|
| Line 397... |
Line 401... |
| 397 |
throws Exception {
|
401 |
throws Exception {
|
| 398 |
CreateOfferRequest createOfferRequest = offerService.getOffer(0, offerId);
|
402 |
CreateOfferRequest createOfferRequest = offerService.getOffer(0, offerId);
|
| 399 |
if (!createOfferRequest.isActive()) {
|
403 |
if (!createOfferRequest.isActive()) {
|
| 400 |
throw new ProfitMandiBusinessException("Offer not active", "Offer not active", "Offer not active");
|
404 |
throw new ProfitMandiBusinessException("Offer not active", "Offer not active", "Offer not active");
|
| 401 |
}
|
405 |
}
|
| 402 |
if (createOfferRequest.getSchemeType().equals(OfferSchemeType.SELLIN)) {
|
- |
|
| 403 |
offerService.processSellin(createOfferRequest);
|
406 |
offerBatchService.processOfferWithBatch(offerId);
|
| 404 |
} else if (createOfferRequest.getSchemeType().equals(OfferSchemeType.ACTIVATION)) {
|
- |
|
| 405 |
offerService.processActivationtOffer(createOfferRequest);
|
- |
|
| 406 |
}
|
- |
|
| 407 |
return responseSender.ok(true);
|
407 |
return responseSender.ok(true);
|
| 408 |
}
|
408 |
}
|
| 409 |
|
409 |
|
| 410 |
@RequestMapping(value = "/offerDownload", method = RequestMethod.GET)
|
410 |
@RequestMapping(value = "/offerDownload", method = RequestMethod.GET)
|
| 411 |
public ResponseEntity<?> dowloadOfferSummary(HttpServletRequest request, @RequestParam int offerId, Model model)
|
411 |
public ResponseEntity<?> dowloadOfferSummary(HttpServletRequest request, @RequestParam int offerId, Model model)
|