package com.ga.core.mapper.commission;

import com.ga.core.vo.commission.PersistencyBonusRuleResp;
import com.ga.core.vo.commission.PersistencyBonusRuleSearchParam;
import com.ga.core.vo.commission.PersistencyBonusRuleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface PersistencyBonusRuleMapper {
    PersistencyBonusRuleResp selectById(@Param("ruleId") Long ruleId);
    List<PersistencyBonusRuleResp> selectList(PersistencyBonusRuleSearchParam param);
    PersistencyBonusRuleVO selectActiveRule(@Param("gradeId") Long gradeId,
                                           @Param("retentionMonth") int retentionMonth,
                                           @Param("baseDate") LocalDate baseDate);
    int insert(PersistencyBonusRuleVO vo);
    int update(PersistencyBonusRuleVO vo);
    int delete(@Param("ruleId") Long ruleId);
}
