package com.hzs.member.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 com.hzs.member.achieve.controller.vo.ParentAchieveVO;
import com.hzs.member.achieve.controller.vo.RealPerformanceVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 会员月数据 Mapper 接口
 */
public interface CuMemberMonthAchieveMapper extends BaseMapper<CuMemberMonthAchieve> {

    /**
     * 根据时间查询月业绩
     */
    List<CuMemberMonthAchieveExt> queryCuMemberMonthAchieveByDate(@Param("startPeriod") Integer startPeriod, @Param("endPeriod") Integer endPeriod,
                                                                  @Param("recommend") Integer recommend, @Param("repurchase") Integer repurchase);

    /**
     * 根据条件查询会员月业绩 推荐达人
     */
    List<CuMemberMonthAchieveExt> queryCuMemberMonthAchieveRecommend(ParentAchieveVO parentAchieveVO);

    /**
     * 查询会员真实业绩
     *
     * @param pkMember
     * @param achieveTable
     * @return
     */
    RealPerformanceVo queryCuMemberMonthAchieveInfo(@Param("pkMember") Long pkMember, @Param("achieveTable") String achieveTable);
}
