package com.hzs.bonus.achieve.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.member.achieve.CuMemberSettlePeriod;
import com.hzs.common.domain.member.achieve.ext.CuMemberSettlePeriodExt;
import com.hzs.bonus.achieve.param.MemberPeriodParam;
import org.apache.ibatis.annotations.Param;

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

/**
 * 会员结算期间 Mapper 接口
 */
public interface CuMemberSettlePeriodMapper extends BaseMapper<CuMemberSettlePeriod> {

    /**
     * 根据日期查询会员结算期间
     */
    CuMemberSettlePeriodExt queryMemberSettlePeriod(@Param("pkCountry") Integer pkCountry,
                                                    @Param("settleDate") Date settleDate);

    /**
     * 根据日期查询对应的期间列表
     */
    List<CuMemberSettlePeriodExt> listMemberSettlePeriod(@Param("pkCountry") Integer pkCountry,
                                                         @Param("settleDate") Date settleDate,
                                                         @Param("endSettleDate") Date endSettleDate);

    /**
     * 查询期间
     */
    List<CuMemberSettlePeriodExt> queryMemberSettlePeriodByCondition(MemberPeriodParam memberPeriodParam);

}
