From 53ce8de426561e7a43847afda23b5e24e6f76c4e Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 19 一月 2026 17:29:55 +0800
Subject: [PATCH] 2026.1.19 1. 新增可配置的台账提交期限 2. 新增可配置的自巡查承诺
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NotificationController.kt | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NotificationController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NotificationController.kt
index 0382f15..e5538ae 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NotificationController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NotificationController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.domain.entity.NoticeConfig
import cn.flightfeather.supervision.lightshare.service.NotificationService
import cn.flightfeather.supervision.lightshare.vo.NoticeReadStateVo
import cn.flightfeather.supervision.lightshare.vo.NotificationVo
@@ -13,6 +14,15 @@
@RestController
@RequestMapping("/notifications")
class NotificationController(val notificationService: NotificationService) {
+
+ @ApiOperation(value = "鎸夋煡璇㈡潯浠惰幏鍙栭�氱煡")
+ @PostMapping("/history")
+ fun getAllNotices(
+ @ApiParam("鐢ㄦ埛id") @RequestParam(value = "userId") userId: String,
+ @ApiParam("閫氱煡鏌ヨ鏉′欢") @RequestBody noticeConfig: NoticeConfig,
+ @ApiParam("椤电爜") @RequestParam(value = "page") page: Int,
+ @ApiParam("鍗曢〉鏁版嵁閲�") @RequestParam(value = "per_page") perPage: Int,
+ ) = notificationService.getAllNotices(userId, noticeConfig, page, perPage)
@ApiOperation(value = "鑾峰彇鐢ㄦ埛鏈閫氱煡")
@GetMapping
@@ -43,9 +53,29 @@
) = notificationService.getUnReadNoticeNum(userId)
@ApiOperation(value = "鍙戝竷閫氱煡")
- @PostMapping("{userId}/release")
+ @PostMapping("/{userId}/release")
fun releaseNotice(
@ApiParam("鐢ㄦ埛id") @PathVariable("userId") userId: String,
@ApiParam("閫氱煡") @RequestBody notice: NotificationVo
) = notificationService.releaseNotice(userId, notice)
+
+ @ApiOperation(value = "鍙戝竷閫氱煡")
+ @PostMapping("/{userId}/release2")
+ fun releaseNotice2(
+ @ApiParam("鐢ㄦ埛id") @PathVariable("userId") userId: String,
+ @ApiParam("閫氱煡") @RequestBody notice: NotificationVo
+ ) = notificationService.releaseNotice2(userId, notice)
+
+ @ApiOperation(value = "鎺ㄩ�佷竴鏉″井淇¤闃呮秷鎭�")
+ @GetMapping("/wx/message/subscribe/send")
+ fun pushMsgWx(
+ @ApiParam("妯℃澘id") @RequestParam("templateId") templateId: Int
+ ) = notificationService.pushMsgWx(templateId)
+
+ @ApiOperation(value = "鑾峰彇閫氱煡妯℃澘")
+ @GetMapping("/template")
+ fun getTemplate(
+ @ApiParam("閫氱煡绫诲瀷") @RequestParam("typeId") typeId: Int,
+ @ApiParam("閫氱煡瀛愮被鍨�") @RequestParam("subTypeId") subTypeId: Int,
+ ) = notificationService.getTemplate(typeId, subTypeId)
}
\ No newline at end of file
--
Gitblit v1.9.3