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

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.domain.member.achieve.CuMemberTree;
import com.hzs.common.domain.member.ext.CuMemberSettleExt;
import com.hzs.report.report.mapper.ReportCuMemberTreeMapper;
import com.hzs.report.report.service.IReportCuMemberTreeService;
import com.hzs.report.report.vo.ReportRecommendAchievementVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 会员网体历史记录 服务实现类
 *
 * @author hzs
 * @since 2022-10-31
 */
@Slf4j
@Service
public class ReportCuMemberTreeServiceImpl extends ServiceImpl<ReportCuMemberTreeMapper, CuMemberTree> implements IReportCuMemberTreeService {

    /**
     * 根据pkmember查询
     *
     * @param settleTableName
     * @param pkMember
     * @return
     */
    @Override
    public CuMemberSettleExt queryCuMemberTreeByPkMemberTable(String settleTableName, Long pkMember) {
        return baseMapper.queryCuMemberTreeByPkMemberTable(settleTableName, pkMember);
    }
    /**
     * 查询会员直推伞下
     * @param settleTableName
     * @param pkMembers
     * @return
     */
    @Override
    public List<ReportRecommendAchievementVo> recommendAchievement(String settleTableName, List<Long> pkMembers) {
        return baseMapper.recommendAchievement(settleTableName, pkMembers);
    }
    /**
     * 查询会员直推业绩
     * @param settleTableName
     * @param pkMembers
     * @return
     */
    @Override
    public List<ReportRecommendAchievementVo> listParentAchieve(String settleTableName, List<Long> pkMembers) {
        return baseMapper.listParentAchieve(settleTableName, pkMembers);
    }

}
