Interface FlashBuyService
- All Known Implementing Classes:
DefaultFlashBuyService
public interface FlashBuyService
Deals with flash buy related models using existing DAOs
-
Method Summary
Modifier and TypeMethodDescriptionvoidCreate or update cronjob for flash buy coupon to reset max order quantityvoidDeletes cronjobs for setting and resetting max order quantity and triggered by flash buy couponGets all products by promotionsourcerulegetFlashBuyCouponByProduct(ProductModel product) Gets flash buy coupon by productGets flash buy coupon by promotion source rulegetProductForCode(String productCode) Finds Product by product codegetProductForPromotion(AbstractPromotionModel promotion) Gets product by promotiongetProductForPromotionSourceRule(PromotionSourceRuleModel promotionSourceRule) Gets productforpromotionsourcerule by promotionsourcerulegetPromotionByCode(String promotionCode) Finds Promotion by given promotion codegetPromotionSourceRulesByProductCode(String productCode) Gets promotion source rules by productvoidPerforms cronjob for flash buy directlyvoidundeployFlashBuyPromotion(PromotionSourceRuleModel promotionSourceRule) Stops flash buy promotion by promotion
-
Method Details
-
getProductForPromotion
Gets product by promotion- Parameters:
promotion- the given promotion- Returns:
- Optional
Optional of ProductModel
-
getPromotionSourceRulesByProductCode
Gets promotion source rules by product- Parameters:
productCode- the product code- Returns:
- list of PromotionSourceRuleModel
-
getFlashBuyCouponByPromotionCode
Gets flash buy coupon by promotion source rule- Parameters:
code- the promotion code- Returns:
- Optional
Optional of FlashBuyCouponModel
-
undeployFlashBuyPromotion
Stops flash buy promotion by promotion- Parameters:
promotionSourceRule- the promotionSourceRule model
-
getPromotionByCode
Finds Promotion by given promotion code- Parameters:
promotionCode- the given promotion code- Returns:
- AbstractPromotion Model
-
createCronJobForFlashBuyCoupon
Create or update cronjob for flash buy coupon to reset max order quantity- Parameters:
coupon- the flash buy coupon model
-
performFlashBuyCronJob
Performs cronjob for flash buy directly- Parameters:
coupon- the flash buy coupon model
-
getProductForPromotionSourceRule
List<ProductForPromotionSourceRuleModel> getProductForPromotionSourceRule(PromotionSourceRuleModel promotionSourceRule) Gets productforpromotionsourcerule by promotionsourcerule- Parameters:
promotionSourceRule- the promotion source rule- Returns:
- List of ProductForPromotionSourceRuleModel
-
getProductForCode
Finds Product by product code- Parameters:
productCode- the given productCode- Returns:
- List
list of ProductModel
-
getAllProductsByPromotionSourceRule
Gets all products by promotionsourcerule- Parameters:
rule- the promotion source rule- Returns:
- List
list of ProductModel
-
getFlashBuyCouponByProduct
Gets flash buy coupon by product- Parameters:
product- the product model- Returns:
- List
list of FlashBuysCouponModel
-
deleteCronJobAndTrigger
Deletes cronjobs for setting and resetting max order quantity and triggered by flash buy coupon- Parameters:
coupon- the flash buy coupon model
-