From 9a30a3a8d3862a9b2ce898535b7cb51c3ddac816 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期三, 20 五月 2026 16:01:11 +0800
Subject: [PATCH] refactor(controller): 将控制器响应结果统一为R类型并继承BaseController
---
src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java b/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java
index 813fb44..047863c 100644
--- a/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java
+++ b/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java
@@ -5,7 +5,8 @@
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.R;
import com.ruoyi.purchase.dto.InvoicePurchaseReportDto;
import com.ruoyi.purchase.dto.VatDto;
import com.ruoyi.purchase.pojo.InvoicePurchase;
@@ -27,15 +28,15 @@
@Tag(name = "閲囪喘鎶ヨ〃")
@RequestMapping("/purchase/report")
@AllArgsConstructor
-public class AccountingReportController {
+public class AccountingReportController extends BaseController {
private IInvoicePurchaseService invoicePurchaseService;
@GetMapping("/list")
@Log(title = "閲囪喘鎶ヨ〃-椤圭洰鍒╂鼎", businessType = BusinessType.OTHER)
- public AjaxResult list(Page page, InvoicePurchaseReportDto invoicePurchaseReportDto) {
+ public R<?> list(Page page, InvoicePurchaseReportDto invoicePurchaseReportDto) {
IPage<InvoicePurchaseReportDto> result =invoicePurchaseService.listPurchaseReport(page, invoicePurchaseReportDto);
- return AjaxResult.success(result);
+ return R.ok(result);
}
@Log(title = "閲囪喘鎶ヨ〃-椤圭洰鍒╂鼎瀵煎嚭", businessType = BusinessType.EXPORT)
@@ -51,9 +52,9 @@
@Log(title = "閲囪喘鎶ヨ〃-澧炲�肩◣姣斿", businessType = BusinessType.OTHER)
@GetMapping("/listVat")
- public AjaxResult listVat(Page page,String month) {
+ public R<?> listVat(Page page,String month) {
IPage<VatDto> result = invoicePurchaseService.listVat(page, month);
- return AjaxResult.success(result);
+ return R.ok(result);
}
@Log(title = "閲囪喘鎶ヨ〃-澧炲�肩◣姣斿", businessType = BusinessType.EXPORT)
--
Gitblit v1.9.3