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

import com.jeesharp.business.modules.mall.entity.MallRewardLevelConfig;
import com.jeesharp.business.modules.mall.vo.MallRewardLevelConfigQueryVO;
import com.jeesharp.framework.mybatis.core.service.BaseInterface;

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

/**
 * 消费赠送配置 Service 接口
 */
public interface MallRewardLevelConfigService extends BaseInterface<MallRewardLevelConfig, MallRewardLevelConfigQueryVO> {

    void createConfig(MallRewardLevelConfig entity);

    void updateConfig(MallRewardLevelConfig entity);
List<MallRewardLevelConfig> listEnabledConfigs();

    MallRewardLevelConfig getConfigByLevel(String memberLevelCode);

    MallRewardLevelConfig getDefaultConfig();

    Integer calculateRewardPoints(String memberLevelCode, BigDecimal orderAmount);

    Integer calculateRewardCoins(String memberLevelCode, BigDecimal orderAmount);

    void initDefaultConfigs();
}
