package com.hzs.bonus.bonus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.bonus.bonus.param.BonusExpandParam;
import com.hzs.common.domain.member.bonus.CuBonusExpand;
import com.hzs.common.domain.member.ext.CuBonusExpandExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Mapper 接口
 */
public interface CuBonusExpandMapper extends BaseMapper<CuBonusExpand> {

    /*
     *  查询4-n配置
     **/
    List<CuBonusExpandExt> queryBonusExpand(BonusExpandParam bonusExpandParam);

    /*
     *  查询日期是否标红
     **/
    List<CuBonusExpandExt> queryBonusExpandDis(BonusExpandParam bonusExpandParam);

    /*
     *  查询所有零线会员
     **/
    List<CuBonusExpand> queryZeroMemberByVertex();

    /*
     *  根基时间、期间计算波比
     **/
    List<CuBonusExpand> calculateDayRatioByBonusExpandParam(@Param("bonusExpandParam") BonusExpandParam bonusExpandParam, @Param("tableName") String tableName);

    /*
     *  根基时间、期间计算波比
     **/
    List<CuBonusExpand> calculateDayRepRatioByBonusExpandParam(@Param("bonusExpandParam") BonusExpandParam bonusExpandParam, @Param("tableName") String tableName);

    /*
     *  删除临时表
     **/
    void truncateTable();

    /*
     *  批量更新4-n配置
     **/
    void mergeBonusExpandByList(@Param("cuBonusExpandList") List<CuBonusExpand> cuBonusExpandList);
}
