Interface FlashBuyService

All Known Implementing Classes:
DefaultFlashBuyService

public interface FlashBuyService
Deals with flash buy related models using existing DAOs
  • Method Details

    • getProductForPromotion

      Optional<ProductModel> getProductForPromotion(AbstractPromotionModel promotion)
      Gets product by promotion
      Parameters:
      promotion - the given promotion
      Returns:
      Optional Optional of ProductModel
    • getPromotionSourceRulesByProductCode

      List<PromotionSourceRuleModel> getPromotionSourceRulesByProductCode(String productCode)
      Gets promotion source rules by product
      Parameters:
      productCode - the product code
      Returns:
      list of PromotionSourceRuleModel
    • getFlashBuyCouponByPromotionCode

      Optional<FlashBuyCouponModel> getFlashBuyCouponByPromotionCode(String code)
      Gets flash buy coupon by promotion source rule
      Parameters:
      code - the promotion code
      Returns:
      Optional Optional of FlashBuyCouponModel
    • undeployFlashBuyPromotion

      void undeployFlashBuyPromotion(PromotionSourceRuleModel promotionSourceRule)
      Stops flash buy promotion by promotion
      Parameters:
      promotionSourceRule - the promotionSourceRule model
    • getPromotionByCode

      AbstractPromotionModel getPromotionByCode(String promotionCode)
      Finds Promotion by given promotion code
      Parameters:
      promotionCode - the given promotion code
      Returns:
      AbstractPromotion Model
    • createCronJobForFlashBuyCoupon

      void createCronJobForFlashBuyCoupon(FlashBuyCouponModel coupon)
      Create or update cronjob for flash buy coupon to reset max order quantity
      Parameters:
      coupon - the flash buy coupon model
    • performFlashBuyCronJob

      void performFlashBuyCronJob(FlashBuyCouponModel coupon)
      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

      List<ProductModel> getProductForCode(String productCode)
      Finds Product by product code
      Parameters:
      productCode - the given productCode
      Returns:
      List list of ProductModel
    • getAllProductsByPromotionSourceRule

      List<ProductModel> getAllProductsByPromotionSourceRule(PromotionSourceRuleModel rule)
      Gets all products by promotionsourcerule
      Parameters:
      rule - the promotion source rule
      Returns:
      List list of ProductModel
    • getFlashBuyCouponByProduct

      List<FlashBuyCouponModel> getFlashBuyCouponByProduct(ProductModel product)
      Gets flash buy coupon by product
      Parameters:
      product - the product model
      Returns:
      List list of FlashBuysCouponModel
    • deleteCronJobAndTrigger

      void deleteCronJobAndTrigger(FlashBuyCouponModel coupon)
      Deletes cronjobs for setting and resetting max order quantity and triggered by flash buy coupon
      Parameters:
      coupon - the flash buy coupon model