package com.hzs.bonus.achieve.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.member.achieve.CuMemberMonthAchieve;
import com.hzs.common.domain.member.ext.CuMemberMonthAchieveExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 会员月数据 Mapper 接口
 * </p>
 *
 * @author hzs
 * @since 2023-06-06
 */
public interface CuMemberMonthAchieveMapper extends BaseMapper<CuMemberMonthAchieve> {

    /*
     * @description: 根据时间查询月业绩
     * @author: sui q
     * @date: 2023/6/7 14:37
     * @param: null null
     **/
    List<CuMemberMonthAchieveExt> queryCuMemberMonthAchieveByDate(@Param("startPeriod") Integer startPeriod, @Param("endPeriod") Integer endPeriod,
                                                                  @Param("recommend") Integer recommend, @Param("repurchase") Integer repurchase);


    /*
     * @description: 每天插入会员月表，计算推荐业绩，复购业绩，1-6号计算前7天
     * @author: sui q
     * @date: 2023/6/6 14:15
     * @param: null null
     **/
    void insertCuMemberMonthAchieve(@Param("tableName") String tableName, @Param("period") Integer period, @Param("month") String month);
}
