package com.hzs.report.member.service.impl;

import com.hzs.report.member.mapper.CuMemberAwardsStatMapper;
import com.hzs.report.member.service.ICuMemberAwardsStatService;
import com.hzs.report.member.vo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.*;

/**
 * <p>
 * 会员信息-奖衔升级记录 服务实现类
 * </p>
 *
 * @author hzs
 * @since 2022-08-31
 */
@Service
public class CuMemberAwardsStatServiceImpl implements ICuMemberAwardsStatService {


    @Autowired
    private CuMemberAwardsStatMapper memberAwardsStatMapper;
    /**
     * @description: 真实业绩新增奖衔查询
     * @author: zhang jing
     * @date: 2023/8/24 17:56
     * @param: [cuMemberAwardsVO]
     * @return: java.util.List<com.hzs.member.detail.vo.CuMemberAwardsVO>
     **/
    @Override
    public List<CuMemberAwardsStatVO> selectCuMemberAwardsList(CuMemberAwardsStatVO cuMemberAwardsStatVO) {
        return memberAwardsStatMapper.selectCuMemberAwardsList(cuMemberAwardsStatVO);
    }

    /**
     * @description: 个人统计
     * @author: zhang jing
     * @date: 2023/9/1 10:37
     * @param: [personStatVO]
     * @return: java.util.List<com.hzs.report.member.vo.PersonStatVO>
     **/
    @Override
    public List<PersonStatVO> selectPersonStatList(PersonStatVO personStatVO) {
        return memberAwardsStatMapper.selectPersonStatList(personStatVO);
    }

    /**
     * @description: 查询左右区新增业绩
     * @author: zhang jing
     * @date: 2023/8/28 11:25
     * @param: [cuMemberAwardsStatVO]
     * @return: java.util.List<com.hzs.report.member.vo.CuMemberAwardsStatVO>
     **/
    @Override
    public List<CuMemberAwardsStatVO> selectNewPvList(List<CuMemAchieveStatVO> cas) {
        return memberAwardsStatMapper.selectNewPvList(cas);
    }

    /**
     * @description: 真实奖衔分析
     * @author: zhang jing
     * @date: 2023/8/26 16:01
     * @param: [cuMemberAwardsAnalysisVO]
     * @return: java.util.List<com.hzs.report.member.vo.CuMemberAwardsAnalysisVO>
     **/
    @Override
    public List<CuMemberAwardsAnalysisVO> selectCuMemberAwardsAnalysisList(CuMemberAwardsAnalysisVO cuMemberAwardsAnalysisVO) {
        return memberAwardsStatMapper.selectCuMemberAwardsAnalysisList(cuMemberAwardsAnalysisVO);
    }

    /**
     * @description: 中国查询真实奖衔分析
     * @author: zhang jing
     * @date: 2024/9/2 17:23
     * @param: [cuMemberAwardsAnalysisVO]
     * @return: java.util.List<com.hzs.report.member.vo.CuMemberAwardsAnalysisVO>
     **/
    @Override
    public List<CuMemberAwardsAnalysisVO> selectCuMemberAwardsAnalysisListCn(CuMemberAwardsAnalysisVO cuMemberAwardsAnalysisVO) {
        return memberAwardsStatMapper.selectCuMemberAwardsAnalysisListCn(cuMemberAwardsAnalysisVO);
    }



    /**
     * @description: 真实奖衔分析-插叙部门下会员累计业绩
     * @author: zhang jing
     * @date: 2023/12/13 14:38
     * @param: [pkMember]
     * @return: java.util.List<com.hzs.report.member.vo.PlaceDeptMemberVO>
     **/
    @Override
    public List<PlaceDeptMemberVO> selectPlaceDeptMemberAnalysisList(String achieveTableName,Long pkMember) {
        return memberAwardsStatMapper.selectPlaceDeptMemberAnalysisList(achieveTableName,pkMember);
    }



    /**
     * @description: 真实奖衔分析详情（穿透页面接口）
     * @author: zhang jing
     * @date: 2023/9/26 14:27
     * @param: [cuMemberAwardsAnalysisVO]
     * @return: java.util.List<com.hzs.report.member.vo.CuMemberAwardsAnalysisVO>
     **/
    @Override
    public List<CuMemberAwardsAnalysisVO> selectCuMemberAwardsAnalysisDetailsList(CuMemberAwardsAnalysisVO cuMemberAwardsAnalysisVO) {
        return memberAwardsStatMapper.selectCuMemberAwardsAnalysisDetailsList(cuMemberAwardsAnalysisVO);
    }

    /**
     * @description: 收入明细
     * @author: zhang jing
     * @date: 2023/9/26 15:07
     * @param: [revenueDetailsVO]
     * @return: java.util.List<com.hzs.report.member.vo.RevenueDetailsVO>
     **/
    @Override
    public List<RevenueDetailsVO> selectRevenueDetailsList(RevenueDetailsVO revenueDetailsVO) {
        return memberAwardsStatMapper.selectRevenueDetailsList(revenueDetailsVO);
    }

    /**
     * @description: 查询真实奖衔分析业绩
     * @author: zhang jing
     * @date: 2023/8/29 9:30
     * @param: [casList]
     * @return: java.util.List<com.hzs.report.member.vo.CuMemberAwardsAnalysisVO>
     **/
    @Override
    public List<CuMemberAwardsAnalysisVO> selectAddUpPvList(List<CuMemAchieveStatVO> casList) {
        return memberAwardsStatMapper.selectAddUpPvList(casList);
    }

    /**
     * @description: 复购bv统计
     * @author: zhang jing
     * @date: 2023/8/29 15:31
     * @param: [repurchasePVStatVO]
     * @return: java.util.List<com.hzs.report.member.vo.RepurchasePVStatVO>
     **/
    @Override
    public List<RepurchasePVStatVO> selectRepurchasePVStatList(RepurchasePVStatVO repurchasePVStatVO) {
        return memberAwardsStatMapper.selectRepurchasePVStatList(repurchasePVStatVO);
    }

    /**
     * @description: 商城BV统计
     * @author: zhang jing
     * @date: 2023/8/30 10:54
     * @param: [mallPVStatVO]
     * @return: java.util.List<com.hzs.report.member.vo.RepurchasePVStatVO>
     **/
    @Override
    public List<MallPVStatVO> selectMallPVStatList(MallPVStatVO mallPVStatVO) {
        return memberAwardsStatMapper.selectMallPVStatList(mallPVStatVO);
    }

    /**
     * @description: 个人统计业绩查询
     * @author: zhang jing
     * @date: 2023/9/1 11:04
     * @param: [personStatVO]
     * @return: java.util.List<com.hzs.report.member.vo.PersonStatVO>
     **/
    @Override
    public List<PersonStatVO> selectPersonPvList(List<PersonStatVO> perList) {
        return memberAwardsStatMapper.selectPersonPvList(perList);
    }

    /**
     * @description: 直推统计
     * @author: zhang jing
     * @date: 2023/9/4 11:46
     * @param: [directPushVO]
     * @return: java.util.List<com.hzs.report.member.vo.DirectPushVO>
     **/
    @Override
    public List<DirectPushVO> selectDirectPushStatList(DirectPushVO directPushVO) {
        return memberAwardsStatMapper.selectDirectPushStatList(directPushVO);
    }

    /**
     * @description: 会员订单分布统计
     * @author: zhang jing
     * @date: 2023/9/20 14:46
     * @param: [orderScatterVO]
     * @return: java.util.List<com.hzs.report.member.vo.OrderScatterVO>
     **/
    @Override
    public List<OrderScatterVO> memberOrderScatter(OrderScatterVO orderScatterVO) {
        return memberAwardsStatMapper.memberOrderScatter(orderScatterVO);
    }

    /**
     * @description: 安置业绩统计-查询会员
     * @author: zhang jing
     * @date: 2024/1/25 15:36
     * @param: [psVO]
     * @return: java.util.List<com.hzs.report.member.vo.PositStatVO>
     **/
    @Override
    public List<PositStatVO> positStatList(PositStatVO psVO) {
        return memberAwardsStatMapper.positStatList(psVO);
    }

    /**
     * @description: 安置业绩统计 查询左右区业绩
     * @author: zhang jing
     * @date: 2024/1/26 14:50
     * @param: [psVO]
     * @return: java.util.List<com.hzs.report.member.vo.PositStatVO>
     **/
    @Override
    public List<PositDeptAchieveVO> positStatAchieve(PositStatVO psVO) {
        return memberAwardsStatMapper.positStatAchieve(psVO);
    }

    /**
     * @description:查询国家业绩
     * @author: zhang jing
     * @date: 2024/5/24 14:08
     * @param: [achieveSummaryVO]
     * @return: java.util.List<com.hzs.report.member.vo.AchieveSummaryVO>
     **/
    @Override
    public List<AchieveSummaryVO> achieveSummaryList(AchieveSummaryVO achieveSummaryVO) {
        return memberAwardsStatMapper.achieveSummaryList(achieveSummaryVO);
    }

    /**
     * @description: 查询奖金扣项配置参数
     * @author: zhang jing
     * @date: 2024/5/24 15:15
     * @param: [achieveSummaryVO]
     * @return: com.hzs.report.member.vo.AchieveSummaryVO
     **/
    @Override
    public List<AchieveSummaryVO> bonusDeduct(AchieveSummaryVO achieveSummaryVO) {
        return memberAwardsStatMapper.bonusDeduct(achieveSummaryVO);
    }

    /**
     * @description: 查询国家首购奖金拨比
     * @author: zhang jing
     * @date: 2024/5/24 15:14
     * @param: [achieveSummaryVO]
     * @return: java.math.BigDecimal
     **/
    @Override
    public BigDecimal queryForeignCountryCuBonusStatisSum(AchieveSummaryVO achieveSummaryVO) {
        return memberAwardsStatMapper.queryForeignCountryCuBonusStatisSum(achieveSummaryVO);
    }

    /**
     * @description: 查询开通店铺会员的推荐
     * @author: zhang jing
     * @date: 2024/7/29 15:02
     * @param: [queryParentStoreVO]
     * @return: java.util.List<com.hzs.report.member.vo.QueryParentStoreVO>
     **/
    @Override
    public List<QueryParentStoreVO> queryReferenceList(QueryParentStoreVO queryParentStoreVO) {
        return memberAwardsStatMapper.queryReferenceList(queryParentStoreVO);
    }

    /**
     * @description: 统计推荐人安置部门下开通店铺
     * @author: zhang jing
     * @date: 2024/7/29 15:02
     * @param: [queryParentStoreVO]
     * @return: java.util.List<com.hzs.report.member.vo.QueryParentStoreVO>
     **/
    @Override
    public StoreNumberVO queryParentStoreList(QueryParentStoreVO queryParentStoreVO) {
        return memberAwardsStatMapper.queryParentStoreList(queryParentStoreVO);
    }

    /**
     * @description: 推荐店铺查询详情
     * @author: zhang jing
     * @date: 2024/7/30 16:48
     * @param: [pkId]
     * @return: java.util.List<com.hzs.report.member.vo.ParentStoreDetailsVO>
     **/
    @Override
    public ParentStoreDetailsVO parentStoreDetails(Long pkId,Long pkParent) {
        return memberAwardsStatMapper.parentStoreDetails(pkId,pkParent);
    }

    /**
     * @description: 查询推荐人安置伞下开通店铺会员
     * @author: zhang jing
     * @date: 2024/8/7 10:13
     * @param: [pkId]
     * @return: java.util.List<com.hzs.report.member.vo.ParentStoreDetailsVO>
     **/
    @Override
    public List<ParentStoreDetailsVO> parentStoreDetailsId(ParentStoreDetailsVO psd) {
        return memberAwardsStatMapper.parentStoreDetailsId(psd);
    }

    /**
     * @description: 推荐店铺查询
     * @author: zhang jing
     * @date: 2024/8/2 9:54
     * @param: [queryParentStoreVO]
     * @return: java.util.List<com.hzs.report.member.vo.QueryParentStoreVO>
     **/
    @Override
    public List<QueryParentStoreVO> getParentStoreList(QueryParentStoreVO queryParentStoreVO) {
        return memberAwardsStatMapper.getParentStoreList(queryParentStoreVO);
    }

    /**
     * @description: 查询表是否存在
     * @author: zhang jing
     * @date: 2024/11/8 14:27
     * @param: [tableName]
     * @return: java.lang.Integer
     **/
    @Override
    public Integer queryExistOracleTable(String tableName) {
        return memberAwardsStatMapper.queryExistOracleTable(tableName);
    }


}
