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/DeviceController.kt | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
index e402b35..774113b 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
@@ -3,6 +3,7 @@
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo
import cn.flightfeather.supervision.lightshare.service.DeviceService
+import cn.flightfeather.supervision.lightshare.vo.AreaVo
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
@@ -57,4 +58,17 @@
@ApiParam("鍒犻櫎鐨勮澶囧浘鐗囪矾寰�") @RequestParam("deleteImg") deleteImg: List<String>,
@ApiParam("璁惧鍥剧墖") @RequestPart("images") images: Array<MultipartFile>,
) = resPack { deviceService.updateDeviceLocation(status, deleteImg, images) }
+
+ @ApiOperation("鏌ヨ浠庡閮ㄨ幏鍙栫殑璁惧淇℃伅")
+ @PostMapping("/external/search")
+ fun searchExternalDevice(
+ @ApiParam("鍖哄煙鏉′欢淇℃伅") @RequestBody
+ areaVo: AreaVo,
+ @ApiParam("鎼滅储鍏抽敭瀛楋紝鍖归厤璁惧缂栧彿鍜岀偣浣嶅悕绉�") @RequestParam
+ keyword: String,
+ @ApiParam("鏌ヨ椤电爜", defaultValue = "1", required = false) @RequestParam("page", required = false)
+ page: Int?,
+ @ApiParam("鍗曢〉鏁版嵁閲�", defaultValue = "30", required = false) @RequestParam("per_page", required = false)
+ perPage: Int?,
+ ) = resPack { deviceService.searchExternalDevice(areaVo, keyword, page, perPage) }
}
\ No newline at end of file
--
Gitblit v1.9.3