zxl
2025-10-23 68c1b17085dd0e2e100018369ed923242bf85feb
统计
1个文件已添加
73 ■■■■■ 已修改文件
seller-api/src/main/java/cn/lili/controller/statistics/StatisticsController.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
seller-api/src/main/java/cn/lili/controller/statistics/StatisticsController.java
New file
@@ -0,0 +1,73 @@
package cn.lili.controller.statistics;
import cn.lili.base.Result;
import cn.lili.modules.member.service.FootprintService;
import cn.lili.modules.order.order.service.OrderService;
import cn.lili.modules.statistics.entity.dto.StatisticsQueryParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * lmk-shop-java
 * 统计数据控制层
 *
 * @author : zxl
 * @date : 2025-09-16 16:36
 **/
@RestController
@RequiredArgsConstructor
@RequestMapping("/store/lmk/statistics")
public class StatisticsController {
    private final OrderService orderService;
    private final FootprintService footprintService;
    @ApiOperation(value = "获取pv、uv流量数据 表单获取")
    @GetMapping("/pvUv")
    public Result getPVUVData(StatisticsQueryParam queryParam) {
        return orderService.getPvUv(queryParam);
    }
    @GetMapping("/orderCount")
    public Result getOrderCount(StatisticsQueryParam queryParam) {
        return orderService.getOrderCount(queryParam);
    }
    /**
     * 视频/商品 完播率和浏览量统计
     * @param queryParam
     * @return
     */
    @GetMapping("/viewAndCompletionRateCount")
    public Result getViewAndCompletionRateCount(StatisticsQueryParam queryParam) {
        return footprintService.getViewAndCompletionRateCount(queryParam);
    }
    /**
     * 浏览数据和下订单时间段分析
     * @param queryParam
     * @return
     */
    @GetMapping("/orderTimePeriod")
    public Result getOrderTimePeriod(StatisticsQueryParam queryParam) {
        return orderService.getOrderTimePeriod(queryParam);
    }
    /**
     * 商品复购率
     * @param queryParam
     * @return
     */
    @GetMapping("/productRepurchase")
    public Result gerProductRepurchase(StatisticsQueryParam queryParam){
        return orderService.gerProductRepurchase(queryParam);
    }
}