package com.hzs.report.member.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.member.achieve.ext.CuMemberAchieveExt;
import com.hzs.common.domain.member.base.CuMember;
import com.hzs.report.member.param.CuMemberUmbrellaParam;
import com.hzs.report.member.vo.CuMemberUmbrellaBalanceVO;
import com.hzs.report.member.vo.UmbrellaBelowPushVO;
import com.hzs.report.report.vo.DeptMemberNumberVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 会员信息-奖衔升级记录 Mapper 接口
 * </p>
 *
 * @author hzs
 * @since 2022-08-31
 */
public interface MemberMapper extends BaseMapper<CuMember> {


    /**
     * @description: 查询伞下账户余额
     * @author: zhang jing
     * @date: 2023/8/25 15:29
     * @param: [umbrellaBalanceVO]
     * @return: java.util.List<com.hzs.member.base.vo.CuMemberUmbrellaBalanceVO>
     **/
    List<CuMemberUmbrellaBalanceVO> selectUmbrellaLowerBalance(CuMemberUmbrellaBalanceVO umbrellaBalanceVO);

    /*
     * @description: 用于反查统计分析，反差伞下，
     * @author: sui q
     * @date: 2023/8/26 10:56
     * @param: null null
     **/
    List<CuMemberAchieveExt> queryPlaceParentHisCuMemberAchieveExt(@Param("tableName") String tableName,
                                                                   @Param("period") Integer period,
                                                                   @Param("param") CuMemberUmbrellaParam param);

    /*
     * @description: 用于反查统计分析，反差伞下，
     * @author: sui q
     * @date: 2023/8/26 10:56
     * @param: null null
     **/
    List<CuMemberAchieveExt> queryPlaceParentCuMemberAchieveExt(@Param("tableName") String tableName,
                                                                @Param("period") Integer period,
                                                                @Param("param") CuMemberUmbrellaParam param);

    /*
     * @description: 用于反查统计分析，反差伞下，
     * @author: sui q
     * @date: 2023/8/26 10:56
     * @param: null null
     **/
    List<CuMemberAchieveExt> queryParentParentHisCuMemberAchieveExt(@Param("tableName") String tableName,
                                                                    @Param("period") Integer period,
                                                                    @Param("param") CuMemberUmbrellaParam param);

    /*
     * @description: 用于反查统计分析，反差伞下，
     * @author: sui q
     * @date: 2023/8/26 10:56
     * @param: null null
     **/
    List<CuMemberAchieveExt> queryParentParentCuMemberAchieveExt(@Param("period") Integer period,
                                                                 @Param("param") CuMemberUmbrellaParam param);

    /**
     * @description: 统计分析-伞下直推
     * @author: zhang jing
     * @date: 2023/6/13 13:43
     * @param: [memberId]
     * @return: java.util.List<com.hzs.member.statis.vo.UmbrellaBelowPushVO>
     **/
    List<UmbrellaBelowPushVO> queryUmbrellaBelowPush(UmbrellaBelowPushVO umbrellaBelowPushVO);

    /**
     * @description: 查询会员订单消费业绩
     * @author: zhang jing
     * @date: 2023/9/12 10:41
     * @param: [umbrellaBelowPushVO]
     * @return: java.util.List<com.hzs.report.member.vo.UmbrellaBelowPushVO>
     **/
    List<UmbrellaBelowPushVO> queryOrderExpend(UmbrellaBelowPushVO umbrellaBelowPushVO);

    /**
     * @description: 统计分析-伞下直推会员信息
     * @author: zhang jing
     * @date: 2023/6/13 13:43
     * @param: [pkId]
     * @return: java.util.List<com.hzs.member.statis.vo.UmbrellaBelowPushVO>
     **/
    UmbrellaBelowPushVO queryUmbrellaBelowInfo(@Param("pkId") Long pkId);

    /**
     * 查询会员左右区人数
     *
     * @param pkMember
     * @return
     */
    List<DeptMemberNumberVO> selectByDeptNumberPlace(@Param("pkMember") Long pkMember);

}
