rk
7 小时以前 cf1d82548a1bd8155ffe9b486df8167aa9e63a7d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package com.doumee.api.business;
 
import com.doumee.api.BaseController;
import com.doumee.core.model.ApiResponse;
import com.doumee.dao.business.vo.BikeUsageStatVO;
import com.doumee.dao.business.vo.DashboardVO;
import com.doumee.dao.business.vo.IncomeStatVO;
import com.doumee.dao.business.vo.PackageSourceStatVO;
import com.doumee.service.business.ReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 数据报表(管理端新增:近30天收益 / 车辆使用情况 / 套餐来源 / 综合看板)。
 * <p>不做菜单/按钮级权限限制:无 @RequiresPermissions,仅受 Shiro authc 登录校验保护,登录后台即可访问。
 * <p>Service 复用 services 模块 {@link ReportService}(与 web 端 /web/report 同源)。
 *
 * @author rk
 * @date 2026/06/26
 */
@Api(tags = "数据报表(管理端)")
@RestController
@RequestMapping("/business/report")
public class ReportController extends BaseController {
 
    @Autowired
    private ReportService reportService;
 
    @ApiOperation("近30天收益统计(按日柱状图+累计+环比/同比)")
    @GetMapping("/incomeStat30")
    public ApiResponse<IncomeStatVO> incomeStat30() {
        return ApiResponse.success(reportService.incomeStat30());
    }
 
    @ApiOperation("车辆使用情况:自行车/电动车各自使用中与空闲数量")
    @GetMapping("/bikeUsageStat")
    public ApiResponse<BikeUsageStatVO> bikeUsageStat() {
        return ApiResponse.success(reportService.bikeUsageStat());
    }
 
    @ApiOperation("套餐销售来源:本月/本年维度,抖音兑换与小程序购买数量")
    @GetMapping("/packageSourceStat")
    public ApiResponse<PackageSourceStatVO> packageSourceStat() {
        return ApiResponse.success(reportService.packageSourceStat());
    }
 
    @ApiOperation("综合看板:本月/昨日/今日收益与订单数,车辆总数/使用中/空闲")
    @GetMapping("/dashboard")
    public ApiResponse<DashboardVO> dashboard() {
        return ApiResponse.success(reportService.dashboard());
    }
}