| New file |
| | |
| | | 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); |
| | | } |
| | | } |