package com.hzs.report.report.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.member.achieve.CuMemberTree;
import com.hzs.common.domain.member.ext.CuMemberSettleExt;
import com.hzs.report.report.vo.ReportRecommendAchievementVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 会员网体历史记录 Mapper 接口
 *
 * @author hzs
 * @since 2022-10-31
 */
public interface ReportCuMemberTreeMapper extends BaseMapper<CuMemberTree> {

    /**
     * 根据pkmember查询
     *
     * @param tableName
     * @param pkMember
     * @return
     */
    CuMemberSettleExt queryCuMemberTreeByPkMemberTable(@Param("tableName") String tableName, @Param("pkMember") Long pkMember);
    /**
     * 查询会员直推伞下
     * @param settleTableName
     * @param pkMembers
     * @return
     */
    List<ReportRecommendAchievementVo> recommendAchievement(@Param("tableName") String settleTableName, @Param("pkMembers") List<Long> pkMembers);

    /**
     * 查询会员直推业绩
     * @param settleTableName
     * @param pkMembers
     * @return
     */
    List<ReportRecommendAchievementVo> listParentAchieve(@Param("tableName") String settleTableName, @Param("pkMembers") List<Long> pkMembers);
}
