package com.jeesharp.business.modules.mall.service;

import com.jeesharp.business.modules.mall.entity.MallPromotionRule;
import com.jeesharp.business.modules.mall.vo.MallPromotionRuleQueryVO;
import com.jeesharp.framework.mybatis.core.service.BaseInterface;

import java.math.BigDecimal;
import java.util.List;

/**
 * 满减/满赠规则 Service 接口
 */
public interface MallPromotionRuleService extends BaseInterface<MallPromotionRule, MallPromotionRuleQueryVO> {

    void createRule(MallPromotionRule entity);

    void updateRule(MallPromotionRule entity);
List<MallPromotionRule> getAvailableFullReductionRules();

    List<MallPromotionRule> getAvailableFullGiftRules();

    BigDecimal calculateFullReductionDiscount(BigDecimal orderAmount);

    List<MallPromotionRule> getAvailableGifts(BigDecimal orderAmount);
}
