package com.ga.core.mapper.commission;

import com.ga.core.vo.commission.RenewalCommissionRuleResp;
import com.ga.core.vo.commission.RenewalCommissionRuleSearchParam;
import com.ga.core.vo.commission.RenewalCommissionRuleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface RenewalCommissionRuleMapper {
    RenewalCommissionRuleResp selectById(@Param("ruleId") Long ruleId);
    List<RenewalCommissionRuleResp> selectList(RenewalCommissionRuleSearchParam param);
    RenewalCommissionRuleVO selectActiveRule(@Param("productId") Long productId,
                                            @Param("baseDate") LocalDate baseDate);
    int insert(RenewalCommissionRuleVO vo);
    int update(RenewalCommissionRuleVO vo);
    int delete(@Param("ruleId") Long ruleId);
}
