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/NightConstructionController.kt | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NightConstructionController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NightConstructionController.kt
index 5164525..2cc78fd 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NightConstructionController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NightConstructionController.kt
@@ -11,25 +11,25 @@
@GetMapping("/record/all")
fun getRecord(
- @RequestParam(value = "cityCode", required = false) cityCode: String?,
- @RequestParam("districtCode") districtCode: String,
- @RequestParam("page") page: Int,
- @RequestParam("perPage") perPage: Int
+ @RequestParam(value = "cityCode", required = false) cityCode: String?,
+ @RequestParam("districtCode") districtCode: String,
+ @RequestParam("page") page: Int,
+ @RequestParam("perPage") perPage: Int,
) = nightConstructionService.getRecord(cityCode, districtCode, page, perPage)
@GetMapping("/record")
fun getNightWorkFile(
- @RequestParam("userId") userId: String,
- @RequestParam(value = "isRead", required = false) isRead: Boolean?,
- @RequestParam("page") page: Int,
- @RequestParam("perPage") perPage: Int
+ @RequestParam("userId") userId: String,
+ @RequestParam(value = "isRead", required = false) isRead: Boolean?,
+ @RequestParam("page") page: Int,
+ @RequestParam("perPage") perPage: Int,
) = nightConstructionService.getNightWorkFile(userId, isRead, page, perPage)
@PostMapping("/sign")
fun signFile(
- @RequestParam("userId") userId: String,
- @RequestParam("fileNum") fileNum: String,
- @RequestParam("id") id: Int
+ @RequestParam("userId") userId: String,
+ @RequestParam("fileNum") fileNum: String,
+ @RequestParam("id") id: Int,
) = nightConstructionService.signFile(userId, fileNum, id)
@PostMapping("/record")
@@ -41,7 +41,7 @@
@GetMapping("/summary")
fun getSummary(
- @RequestParam(value = "cityCode", required = false) cityCode: String?,
- @RequestParam("districtCode") districtCode: String
+ @RequestParam(value = "cityCode", required = false) cityCode: String?,
+ @RequestParam("districtCode") districtCode: String,
) = nightConstructionService.getSummary(cityCode, districtCode)
}
\ No newline at end of file
--
Gitblit v1.9.3