From 8c5464464036193ddac1de2c5155c94141545c7c Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 21 五月 2026 09:44:24 +0800
Subject: [PATCH] 质量管理增加接口描述

---
 src/main/java/com/ruoyi/procurementrecord/controller/GasTankWarningController.java |   37 +++++++++++++++++++++----------------
 1 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/src/main/java/com/ruoyi/procurementrecord/controller/GasTankWarningController.java b/src/main/java/com/ruoyi/procurementrecord/controller/GasTankWarningController.java
index 7646478..135198f 100644
--- a/src/main/java/com/ruoyi/procurementrecord/controller/GasTankWarningController.java
+++ b/src/main/java/com/ruoyi/procurementrecord/controller/GasTankWarningController.java
@@ -3,42 +3,47 @@
 
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.R;
 import com.ruoyi.procurementrecord.pojo.GasTankWarning;
 import com.ruoyi.procurementrecord.service.GasTankWarningService;
-import org.springframework.beans.factory.annotation.Autowired;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 @RestController
 @RequestMapping("/gasTankWarning")
-public class GasTankWarningController {
-    @Autowired
+@AllArgsConstructor
+public class GasTankWarningController extends BaseController {
     private GasTankWarningService gasTankWarningService;
 
     @GetMapping("/listPage")
-    public AjaxResult listPage(Page page, GasTankWarning gasTankWarning) {
-        return AjaxResult.success(gasTankWarningService.listPage(page, gasTankWarning));
+    public R<?> listPage(Page page, GasTankWarning gasTankWarning) {
+        return R.ok(gasTankWarningService.listPage(page, gasTankWarning));
     }
+
     @PostMapping("/add")
-    public AjaxResult add(@RequestBody GasTankWarning gasTankWarning) {
-        return AjaxResult.success(gasTankWarningService.save(gasTankWarning));
+    public R<?> add(@RequestBody GasTankWarning gasTankWarning) {
+        return R.ok(gasTankWarningService.save(gasTankWarning));
     }
+
     @PostMapping("update")
-    public AjaxResult update(@RequestBody GasTankWarning gasTankWarning) {
-        return AjaxResult.success(gasTankWarningService.updateById(gasTankWarning));
+    public R<?> update(@RequestBody GasTankWarning gasTankWarning) {
+        return R.ok(gasTankWarningService.updateById(gasTankWarning));
     }
+
     @DeleteMapping("delete")
-    public AjaxResult delete(@RequestBody List<Long> ids){
-        if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("璇蜂紶鍏ヨ鍒犻櫎鐨処D");
-        return AjaxResult.success(gasTankWarningService.removeByIds(ids));
+    public R<?> delete(@RequestBody List<Long> ids) {
+        if (CollectionUtils.isEmpty(ids)) return R.fail("璇蜂紶鍏ヨ鍒犻櫎鐨処D");
+        return R.ok(gasTankWarningService.removeByIds(ids));
     }
+
     //瀵煎嚭
     @PostMapping("/export")
-    public void export(HttpServletResponse response,@RequestParam(name = "ids", required = false) List<Long> ids){
-        gasTankWarningService.export(response,ids);
+    public void export(HttpServletResponse response, @RequestParam(name = "ids", required = false) List<Long> ids) {
+        gasTankWarningService.export(response, ids);
     }
 
 }

--
Gitblit v1.9.3