From 1a677d2b4a4bc615602f8c2a22bc07ec1356e5be Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 16 十月 2025 17:39:06 +0800
Subject: [PATCH] 2025.10.16 1. 根据全局响应增强器GlobalResponseAdvice,将原先的BaseResPack接口包装函数统一去除; 2. 新增三种类型的数据产品数据库实体 3. 新增典型问题场景清单中间数据产品接口
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 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 90d5434..2a121fb 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)
@@ -88,17 +98,17 @@
@RequestParam("lng") lng: Double,
@RequestParam("lat") lat: Double,
@RequestParam("radius") radius: Double,
- ) = resPack { scenseService.searchByCoordinate(lng, lat, radius) }
+ ) = scenseService.searchByCoordinate(lng, lat, radius)
@ApiOperation(value = "閫氳繃鏂囦欢瀵煎叆鍦烘櫙淇℃伅")
@PostMapping("/import")
fun importSceneInfo(
- @RequestPart("file") file: MultipartFile,
- ) = resPack { scenseService.importSceneInfo(file) }
+ @RequestPart("file") files: Array<MultipartFile>,
+ ) = scenseService.importSceneInfo(files)
@ApiOperation(value = "鍒涘缓鍦烘櫙淇℃伅")
@PutMapping("/create")
fun createScene(
@RequestBody scense: Scense
- ) = resPack { scenseService.createScene(scense) }
+ ) = scenseService.createScene(scense)
}
\ No newline at end of file
--
Gitblit v1.9.3