package com.ycwl.basic.mapper;

import com.ycwl.basic.model.mobile.statistic.req.CommonQueryReq;
import com.ycwl.basic.model.mobile.statistic.req.StatisticsRecordAddReq;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author：longbinbin
 * @Date：2024/12/12 9:51
 */
@Mapper
public interface StatisticsMapper {
    /**
     * 统计支付订单金额
     * @param query
     * @return
     */
    BigDecimal countOrderAmount(CommonQueryReq query);

    /**
     * 统计预览视频人数
     * @param query
     * @return
     */
    Integer countPreviewVideoOfMember(CommonQueryReq query);

    /**
     * 统计扫码访问人数
     * @param query
     * @return
     */
    Integer countScanCodeOfMember(CommonQueryReq query);

    /**
     * 统计点击购买人数
     * @param query
     * @return
     */
    Integer countClickPayOfMember(CommonQueryReq query);

    /**
     * 统计付费人数
     * @param query
     * @return
     */
    Integer countPayOfMember(CommonQueryReq query);

    /**
     * 统计现场支付订单数
     * @param query
     * @return
     */
    Integer countSceneOrderNum(CommonQueryReq query);

    /**
     * 统计推送支付订单数
     * @param query
     * @return
     */
    Integer countPushOrderNum(CommonQueryReq query);

    /**
     * 统计推送订阅人数
     * @param query
     * @return
     */
    Integer countPushOfMember(CommonQueryReq query);

    Integer countCameraShotOfMember(CommonQueryReq query);

    Integer countUploadFaceOfMember(CommonQueryReq query);

    Integer countCompleteVideoOfMember(CommonQueryReq query);

    Integer countTotalVisitorOfMember(CommonQueryReq query);

    Integer countCompleteOfVideo(CommonQueryReq query);

    Integer countPreviewOfVideo(CommonQueryReq query);

    Integer countPayOfOrder(CommonQueryReq query);

    Integer countRefundOfOrder(CommonQueryReq query);

    BigDecimal countRefundAmount(CommonQueryReq query);

    int addStatisticsRecord(StatisticsRecordAddReq req);

    List<Long> getBrokerIdListForUser(Long memberId, Date startTime, Date endTime);
}
