Subversion Repositories SmartDukaan

Rev

Rev 31778 | Rev 32204 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31778 Rev 31922
Line 397... Line 397...
397
		CreateOfferRequest createOfferRequest = offerService.getOffer(0, offerId);
397
		CreateOfferRequest createOfferRequest = offerService.getOffer(0, offerId);
398
		if (!createOfferRequest.isActive()) {
398
		if (!createOfferRequest.isActive()) {
399
			throw new ProfitMandiBusinessException("Offer not active", "Offer not active", "Offer not active");
399
			throw new ProfitMandiBusinessException("Offer not active", "Offer not active", "Offer not active");
400
		}
400
		}
401
		if (createOfferRequest.getSchemeType().equals(OfferSchemeType.SELLIN)) {
401
		if (createOfferRequest.getSchemeType().equals(OfferSchemeType.SELLIN)) {
402
			offerRepository.processSellin(createOfferRequest);
402
			offerService.processSellin(createOfferRequest);
403
		} else if (createOfferRequest.getSchemeType().equals(OfferSchemeType.ACTIVATION)) {
403
		} else if (createOfferRequest.getSchemeType().equals(OfferSchemeType.ACTIVATION)) {
404
			offerRepository.processActivationtOffer(createOfferRequest);
404
			offerService.processActivationtOffer(createOfferRequest);
405
		}
405
		}
406
		return responseSender.ok(true);
406
		return responseSender.ok(true);
407
	}
407
	}
408
 
408
 
409
	@RequestMapping(value = "/offerDownload", method = RequestMethod.GET)
409
	@RequestMapping(value = "/offerDownload", method = RequestMethod.GET)