From 5b37d2ae890b515598f704b3ddf974e67ba11593 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期五, 24 四月 2026 11:24:39 +0800
Subject: [PATCH] refactor(stock): 添加final修饰符优化StockInRecordController

---
 src/main/java/com/ruoyi/stock/controller/StockInRecordController.java |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java b/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
index 94e4669..ac89cc9 100644
--- a/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
+++ b/src/main/java/com/ruoyi/stock/controller/StockInRecordController.java
@@ -6,27 +6,27 @@
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.stock.dto.StockInRecordDto;
-import com.ruoyi.stock.dto.StockInventoryDto;
 import com.ruoyi.stock.service.StockInRecordService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.RequiredArgsConstructor;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 @RestController
-@Api(tags = "鍏ュ簱")
+@Tag(name = "鍏ュ簱")
 @RequestMapping("/stockInRecord")
+@RequiredArgsConstructor
 public class StockInRecordController {
-    @Autowired
-    private StockInRecordService stockInRecordService;
+
+    private final StockInRecordService stockInRecordService;
 
     @GetMapping("/listPage")
     @Log(title = "鐢熶骇鍏ュ簱-鍏ュ簱绠$悊-鍒楄〃", businessType = BusinessType.OTHER)
-    @ApiOperation(value = "鍏ュ簱绠$悊鍒楄〃")
+    @Operation(summary = "鍏ュ簱绠$悊鍒楄〃")
     public AjaxResult listPage(Page page, StockInRecordDto stockInRecordDto) {
         IPage<StockInRecordDto> result = stockInRecordService.listPage(page, stockInRecordDto);
         return AjaxResult.success(result);
@@ -44,7 +44,7 @@
     }
 
     @PostMapping("/exportStockInRecord")
-    @ApiOperation("瀵煎嚭鍏ュ簱璁板綍")
+    @Operation(summary = "瀵煎嚭鍏ュ簱璁板綍")
     public void exportStockInRecord(HttpServletResponse response, StockInRecordDto stockInRecordDto) {
         stockInRecordService.exportStockInRecord(response,stockInRecordDto);
     }

--
Gitblit v1.9.3