package com.hzs.bonus.detail.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.member.detail.CuMemberGrade;
import com.hzs.common.domain.member.detail.CuMemberLevel;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 会员信息-等级升级记录 Mapper 接口
 */
public interface CuMemberGradeMapper extends BaseMapper<CuMemberGrade> {

    /**
     * 回退会员等级
     */
    void updateCuMemberGrade(@Param("rangeTableName") String rangeTableName, @Param("period") Integer period);

    /**
     * 查询会员等级
     */
    List<CuMemberLevel> queryCuMemberLevel(@Param("startDate") Date startDate,
                                           @Param("endDate") Date endDate,
                                           @Param("upType") Integer upType);

}
