From c247f5bf64c98595cc7e4efc9e1ae7ff1df79c11 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 23 四月 2026 14:05:32 +0800
Subject: [PATCH] refactor(swagger): 迁移Swagger注解到OpenAPI 3.0

---
 src/main/java/com/ruoyi/equipmentenergyconsumption/controller/EnergyPeriodController.java |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/ruoyi/equipmentenergyconsumption/controller/EnergyPeriodController.java b/src/main/java/com/ruoyi/equipmentenergyconsumption/controller/EnergyPeriodController.java
index af51f43..e0409b5 100644
--- a/src/main/java/com/ruoyi/equipmentenergyconsumption/controller/EnergyPeriodController.java
+++ b/src/main/java/com/ruoyi/equipmentenergyconsumption/controller/EnergyPeriodController.java
@@ -9,8 +9,8 @@
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.AllArgsConstructor;
 import org.springframework.util.CollectionUtils;
@@ -20,13 +20,13 @@
 
 @RestController
 @RequestMapping("/energyPeriod")
-@Api(tags = "鐢ㄧ數鏃舵")
+@Tag(name = "鐢ㄧ數鏃舵")
 @AllArgsConstructor
 public class EnergyPeriodController extends BaseController {
     private final EnergyPeriodService energyPeriodService;
 
     @GetMapping("/listPage")
-    @ApiOperation("鐢ㄧ數鏃舵-鍒嗛〉鏌ヨ")
+    @Operation(summary = "鐢ㄧ數鏃舵-鍒嗛〉鏌ヨ")
     @Log(title = "鐢ㄧ數鏃舵-鍒嗛〉鏌ヨ", businessType = BusinessType.OTHER)
     public AjaxResult listPage(Page page, EnergyPeriod energyPeriod) {
         IPage<EnergyPeriod> listPage = energyPeriodService.listPage(page, energyPeriod);
@@ -34,7 +34,7 @@
     }
 
     @PostMapping("/add")
-    @ApiOperation("鐢ㄧ數鏃舵-鏂板")
+    @Operation(summary = "鐢ㄧ數鏃舵-鏂板")
     @Log(title = "鐢ㄧ數鏃舵-鏂板", businessType = BusinessType.INSERT)
     public AjaxResult add(@RequestBody EnergyPeriod energyPeriod) {
         boolean save = energyPeriodService.save(energyPeriod);
@@ -42,7 +42,7 @@
     }
 
     @PostMapping("/addBatch")
-    @ApiOperation("鐢ㄧ數鏃舵-鎵归噺鏂板")
+    @Operation(summary = "鐢ㄧ數鏃舵-鎵归噺鏂板")
     @Log(title = "鐢ㄧ數鏃舵-鎵归噺鏂板", businessType = BusinessType.INSERT)
     public AjaxResult addBatch(@RequestBody List<EnergyPeriod> energyPeriods) {
         boolean save = energyPeriodService.saveBatch(energyPeriods);
@@ -50,7 +50,7 @@
     }
 
     @PostMapping("/update")
-    @ApiOperation("鐢ㄧ數鏃舵-淇敼")
+    @Operation(summary = "鐢ㄧ數鏃舵-淇敼")
     @Log(title = "鐢ㄧ數鏃舵-淇敼", businessType = BusinessType.UPDATE)
     public AjaxResult update(@RequestBody EnergyPeriod energyPeriod) {
         boolean update = energyPeriodService.updateById(energyPeriod);
@@ -58,7 +58,7 @@
     }
 
     @DeleteMapping("/delete")
-    @ApiOperation("鐢ㄧ數鏃舵-鍒犻櫎")
+    @Operation(summary = "鐢ㄧ數鏃舵-鍒犻櫎")
     @Log(title = "鐢ㄧ數鏃舵-鍒犻櫎", businessType = BusinessType.DELETE)
     public AjaxResult delete(@RequestBody List<Long> ids) {
         if (CollectionUtils.isEmpty(ids)) return AjaxResult.error("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
@@ -72,7 +72,7 @@
      */
     @Log(title = "瀵煎嚭鐢ㄧ數鏃舵", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    @ApiOperation("瀵煎嚭鐢ㄧ數鏃舵")
+    @Operation(summary = "瀵煎嚭鐢ㄧ數鏃舵")
     public void export(HttpServletResponse response) {
         Page page = new Page(-1, -1);
         EnergyPeriod energyPeriod = new EnergyPeriod();

--
Gitblit v1.9.3