package com.hzs.retail.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.domain.member.achieve.CuMemberRetailRange;
import com.hzs.retail.member.param.MarketDynamicsQueryDateParam;
import com.hzs.retail.member.utils.PageResult;
import com.hzs.retail.member.vo.*;

import java.util.List;

public interface ICuMemberRetailAchieveService extends IService<CuMemberRetailRange> {

    /**
     * 查询会员大小区业绩
     *
     * @param pkMember 会员ID
     * @return CuMemberRetailAchieveVO
     */
    CuMemberRetailAchieveVO selectMemberAchieve(Long pkMember, Integer pkCountry, Integer systemType);

    /**
     * 查询会员大小区盒数
     *
     * @param param 入参
     * @return CuMemberRetailAchieveVO
     */
    CuMemberRetailAchieveVO selectMemberBigSmallBox(CuMemberRetailAchieveVO param);

    /**
     * 查询会员的大区业绩（列表）
     *
     * @param pkMember  会员ID
     * @param pkCountry 国家
     * @return CuMemberRetailAchieveVO
     */
    CuMemberRetailAchieveVO selectMemberBigAchieve(Long pkMember, Integer pkCountry, Integer systemType);

    /**
     * 查询会员业绩列表
     *
     * @param retailAchieveVO 入参
     * @return List<CuMemberRetailAchieveVO>
     */
    List<CuMemberRetailAchieveVO> selectMemberAchieveDetail(CuMemberRetailAchieveVO retailAchieveVO);

    /**
     * 排除注水的小区业绩
     *
     * @param pkMember  会员ID
     * @param pkCountry 国家
     * @return CuMemberRetailAchieveVO
     */
    CuMemberRetailAchieveVO selectExcludeWaterSmallAchieve(Long pkMember, Integer pkCountry, Integer systemType);

    /**
     * 查询会员直推会员
     *
     * @param pkMember 会员主键
     * @return List<Long>
     */
    List<Long> selectDirectPushByPkMember(Long pkMember, Integer systemType);

    /**
     * 市场动态的大小区业绩详情（自己的业绩算一个区）
     *
     * @param pkMember  会员ID
     * @param pkCountry 国家
     * @return CuMemberRetailAchieveVO
     */
    CuMemberRetailAchieveVO selectMemberBigSmallAchieveDetail(Long pkMember, Integer pkCountry, Integer systemType);

    /**
     * 查询大区盒数列表（市场动态）
     *
     * @param param 入参
     * @return CuMemberRetailAchieveVO
     */
    CuMemberRetailAchieveVO selectMemberBigBoxList(CuMemberRetailAchieveVO param);

    /**
     * 查询会员小区盒数列表（市场动态）
     *
     * @param param 入参
     * @return List<CuMemberRetailAchieveVO>
     */
    List<CuMemberRetailAchieveVO> selectMemberSmallBoxList(CuMemberRetailAchieveVO param);

    /**
     * 获取会员结算明细
     *
     * @param pkMember
     * @param pkCountry
     * @param systemType
     * @return
     */
    CuMemberRetailDataStatisticsResultVO getRetailDataStatisticsDetail(Long pkMember, Integer pkCountry, Integer systemType);


    CurrentMonthVO getCurrentMonthPV(String date, Long pkMember, Integer pkCountry, Integer systemType);

    PageResult<MarketDynamicsDetailVO> getMarketDynamics(MarketDynamicsQueryDateParam param);
}
