package com.ycwl.basic.controller.mobile.manage;

import com.ycwl.basic.annotation.IgnoreToken;
import com.ycwl.basic.model.jwt.JwtInfo;
import com.ycwl.basic.model.mobile.statistic.req.CommonQueryReq;
import com.ycwl.basic.model.mobile.statistic.req.StatisticsRecordAddReq;
import com.ycwl.basic.model.mobile.statistic.resp.AppSta1VO;
import com.ycwl.basic.model.mobile.statistic.resp.AppSta2VO;
import com.ycwl.basic.model.mobile.statistic.resp.AppSta3VO;
import com.ycwl.basic.model.mobile.statistic.resp.AppStatisticsFunnelVO;
import com.ycwl.basic.service.mobile.AppStatisticsService;
import com.ycwl.basic.utils.ApiResponse;
import com.ycwl.basic.utils.JwtTokenUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：longbinbin
 * @Date：2024/12/11 18:08
 */
@Slf4j
@RestController
@RequestMapping("/api/mobile/statistics/v1")
// 数据统计相关接口
public class AppStatisticsController {

    @Autowired
    private AppStatisticsService statisticsService;

    // 支付订单金额、预览_支付转化率、扫码_付费用户转化率
    @PostMapping("/one")
    public ApiResponse<AppSta1VO> oneStatistics(@RequestBody CommonQueryReq query) {

        return statisticsService.oneStatistics(query);
    }

    // 支付订单数、现场订单数、推送订单数统计
    @PostMapping("/two")
    public ApiResponse<AppSta2VO> twoStatistics(@RequestBody CommonQueryReq query) {

        return statisticsService.twoStatistics(query);
    }

    // 扫码访问人数、推送订阅人数、预览视频人数统计
    @PostMapping("/free")
    public ApiResponse<AppSta3VO> freeStatistics(@RequestBody CommonQueryReq query) {

        return statisticsService.freeStatistics(query);
    }

    // 用户转化漏斗
    @PostMapping("/userConversionFunnel")
    public ApiResponse<AppStatisticsFunnelVO> userConversionFunnel(@RequestBody CommonQueryReq query) {

        return statisticsService.userConversionFunnel(query);
    }

}
