package com.ga.core.mapper.commission;

import com.ga.core.vo.commission.ReinstatementCommissionRuleResp;
import com.ga.core.vo.commission.ReinstatementCommissionRuleSearchParam;
import com.ga.core.vo.commission.ReinstatementCommissionRuleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface ReinstatementCommissionRuleMapper {
    ReinstatementCommissionRuleResp selectById(@Param("ruleId") Long ruleId);
    List<ReinstatementCommissionRuleResp> selectList(ReinstatementCommissionRuleSearchParam param);
    ReinstatementCommissionRuleVO selectActiveRule(@Param("productId") Long productId,
                                                  @Param("baseDate") LocalDate baseDate);
    int insert(ReinstatementCommissionRuleVO vo);
    int update(ReinstatementCommissionRuleVO vo);
    int delete(@Param("ruleId") Long ruleId);
}
