package com.yunzhi.marketing.xlk.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yunzhi.marketing.center.taUser.entity.TaUser;
import com.yunzhi.marketing.xlk.dto.PcStatisticsDTO;
import com.yunzhi.marketing.xlk.vo.PcStatisticsActivityVO;
import com.yunzhi.marketing.xlk.vo.PcStatisticsGenderVO;
import com.yunzhi.marketing.xlk.vo.PcStatisticsLeaderboardVO;
import com.yunzhi.marketing.xlk.vo.PcStatisticsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PcStatisticsMapper {
    /**
     * 总用户数
     * @return
     */
    int selectAllPerson(@Param("params") PcStatisticsDTO taUser);

    /**
     * 注册用户数
     * @return
     */
    int selectRegisterPerson(@Param("params") PcStatisticsDTO taUser);

    /**
     * 今日访问次数
     * @return
     */
    int selectTodayVisitNum(@Param("params") PcStatisticsDTO statisticsDTO);

    /**
     * 今日新增客户
     * @param statisticsDTO
     * @return
     */
    int selectTodayAddPerson(@Param("params") PcStatisticsDTO statisticsDTO);

    /**
     * 渠道数量
     * @param statisticsDTO
     * @return
     */
    int selectChannelNum(@Param("params") PcStatisticsDTO statisticsDTO);

    /**
     * 经纪人数量
     * @param statisticsDTO
     * @return
     */
    int selectEstateAgentNum(@Param("params") PcStatisticsDTO statisticsDTO);

    /**
     * 来源统计
     * @param statisticsDTO
     * @return
     */
    PcStatisticsVO getUserOriginStatistics(@Param("params") PcStatisticsDTO statisticsDTO);

    /**
     * 性别统计
     * @param statisticsDTO
     * @return
     */
    PcStatisticsGenderVO getuserGenderStatistics(@Param("params") PcStatisticsDTO statisticsDTO);

    /**
     * 公客排行榜
     * @param pcStatisticsDTO
     * @return
     */
    List<PcStatisticsLeaderboardVO> getGkLeaderboard(@Param("params") PcStatisticsDTO pcStatisticsDTO);

    /**
     * 私客排行榜
     * @param pcStatisticsDTO
     * @return
     */
    List<PcStatisticsLeaderboardVO> getSkLeaderboard(@Param("params") PcStatisticsDTO pcStatisticsDTO);

    /**
     * 项目访问次数排行榜
     * @param pcStatisticsDTO
     * @return
     */
    List<PcStatisticsLeaderboardVO> getVisitNumLeaderboard(@Param("params") PcStatisticsDTO pcStatisticsDTO);

    /**
     * 项目成交排行榜
     * @param pcStatisticsDTO
     * @return
     */
    List<PcStatisticsLeaderboardVO> getSuccessLeaderboard(@Param("params") PcStatisticsDTO pcStatisticsDTO);

    /**
     * 活动列表
     * @param page
     * @param pcStatisticsDTO
     * @return
     */
    IPage<PcStatisticsActivityVO> selectActivityList(IPage<PcStatisticsActivityVO> page,@Param("params") PcStatisticsDTO pcStatisticsDTO);
}
