From 196bb14112448857a885e32dc4149e308e00b01a Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期四, 15 八月 2024 11:57:15 +0800 Subject: [PATCH] 2024.8.15 各项修正 --- 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