xuhy
2025-02-27 d036da1b4c6b6a5e4fd358562bedda4a41341ff3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TFlowManagementController.java
@@ -1,6 +1,17 @@
package com.ruoyi.web.controller.api;
import com.ruoyi.common.basic.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.model.TFlowManagement;
import com.ruoyi.system.query.TFlowManagementQuery;
import com.ruoyi.system.service.TFlowManagementService;
import com.ruoyi.system.vo.TFlowManagementStatisticsVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -16,6 +27,24 @@
@RestController
@RequestMapping("/t-flow-management")
public class TFlowManagementController {
    @Autowired
    private TFlowManagementService flowService;
    /**
     * 获取流水列表
     */
    @PreAuthorize("@ss.hasPermi('system:flow:list')")
    @ApiOperation(value = "获取流水列表")
    @PostMapping("/list")
    public R<PageInfo<TFlowManagement>> list(@RequestBody TFlowManagementQuery query) {
        return R.ok(flowService.pageList(query));
    }
    @ApiOperation(value = "根据支付方式统计流水金额")
    @PostMapping("/getPaymentStats")
    public R<TFlowManagementStatisticsVo> getPaymentStats(@RequestBody TFlowManagementQuery query){
        return R.ok(flowService.getPaymentStats(query));
    }
}