From aed297a5fbc8df9dab01b28da21f872ee546b43c Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 13 十月 2025 16:15:11 +0800
Subject: [PATCH] 2025.10.13 1. 统一调整controller层的返回类型,通过添加全局响应增强器GlobalResponseAdvice来管理返回结果; 2. 新增mybatis-generator自定义插件,实现给数据库实体entity自动添加swagger注解@ApiModel和@ApiModelProperty

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
index 2e2d523..9e6b5c7 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
@@ -1,5 +1,6 @@
 package cn.flightfeather.supervision.lightshare.web
 
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
 import cn.flightfeather.supervision.domain.ds1.entity.Scense
 import cn.flightfeather.supervision.domain.ds1.entity.Task
 import cn.flightfeather.supervision.lightshare.service.ScenseService
@@ -16,27 +17,35 @@
 @RestController
 @RequestMapping("/scense")
 class ScenseController(val scenseService: ScenseService) {
+    @IgnoreResponseAdvice
     @GetMapping
     fun getAll() = scenseService.findAll()
 
+    @IgnoreResponseAdvice
     @PutMapping
     fun add(@RequestBody scense: Scense) = scenseService.save(scense)
 
+    @IgnoreResponseAdvice
     @PostMapping
     fun update(@RequestBody scense: Scense) = scenseService.update(scense)
 
+    @IgnoreResponseAdvice
     @PostMapping("/update/list")
     fun updateList(@RequestBody sceneList: MutableList<Scense>) = scenseService.updateList(sceneList)
 
+    @IgnoreResponseAdvice
     @PostMapping("/search")
     fun find(@RequestBody scense: Scense) = scenseService.search(scense)
 
+    @IgnoreResponseAdvice
     @GetMapping("/{id}")
     fun getById(@PathVariable id: String) = scenseService.findOne(id)
 
+    @IgnoreResponseAdvice
     @DeleteMapping("/{id}")
     fun delete(@PathVariable id: String) = scenseService.delete(id)
 
+    @IgnoreResponseAdvice
     @GetMapping("/alltype")
     fun getSceneType() = scenseService.getSceneType()
 
@@ -46,6 +55,7 @@
      * @param mode 0锛氬彧浼氳幏鍙栨�讳换鍔″搴旂殑鐩戠鐗堟湰涓瓨鍦ㄧ殑鍦烘櫙锛�1锛氶櫎浜嗙洃绠$増鏈腑瀛樺湪鐨勫満鏅紝杩樹細鑾峰彇鍓╀綑鐨勫彲鐢ㄥ満鏅�
      * @return 鍦烘櫙鍒楄〃
      */
+    @IgnoreResponseAdvice
     @PostMapping("/getByTask")
     fun getByTaskId(@RequestBody task: Task, @RequestParam(value = "mode") mode: Int) = scenseService.getByTaskId(task, mode)
 

--
Gitblit v1.9.3