From 23bd719cebe5feeff4e48fde925b0b39755eea93 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 15 十一月 2022 10:59:50 +0800 Subject: [PATCH] 2022.11.15 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NotificationController.kt | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 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 b47b946..f7f9453 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NotificationController.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NotificationController.kt @@ -5,6 +5,7 @@ import cn.flightfeather.supervision.lightshare.vo.NotificationVo import io.swagger.annotations.Api import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam import org.springframework.web.bind.annotation.* import javax.servlet.http.HttpServletResponse @@ -16,35 +17,41 @@ @ApiOperation(value = "鑾峰彇鐢ㄦ埛鏈閫氱煡") @GetMapping fun getNotificationUnRead( - @RequestParam(value = "userId") userId: String, - @RequestParam(value = "page") page: Int, - @RequestParam(value = "per_page") perPage: Int, - response: HttpServletResponse + @ApiParam("鐢ㄦ埛id") @RequestParam(value = "userId") userId: String, + @ApiParam("椤电爜") @RequestParam(value = "page") page: Int, + @ApiParam("鍗曢〉鏁版嵁閲�") @RequestParam(value = "per_page") perPage: Int, + response: HttpServletResponse ) = notificationService.getNotificationUnRead(userId, page, perPage, response) @ApiOperation(value = "鏇存柊閫氱煡璇诲彇鐘舵��") @PostMapping("/{userId}/readState") fun updateReadState( - @PathVariable("userId") userId: String, - @RequestBody readStates: List<NoticeReadStateVo> + @ApiParam("鐢ㄦ埛id") @PathVariable("userId") userId: String, + @ApiParam("閫氱煡璇诲彇鐘舵��") @RequestBody readStates: List<NoticeReadStateVo> ) = notificationService.updateReadState(userId, readStates) @ApiOperation(value = "鑾峰彇閫氱煡闀挎枃鏈唴瀹�") @GetMapping("/text") fun getNotificationText( - @RequestParam(value = "id") notificationId: String + @ApiParam("閫氱煡id") @RequestParam(value = "id") notificationId: String ) = notificationService.getNotificationText(notificationId) @ApiOperation(value = "鑾峰彇鎬绘湭璇婚�氱煡鏁伴噺") @GetMapping("/{userId}/unread") fun getUnReadNoticeNum( - @PathVariable("userId") userId: String + @ApiParam("鐢ㄦ埛id") @PathVariable("userId") userId: String ) = notificationService.getUnReadNoticeNum(userId) @ApiOperation(value = "鍙戝竷閫氱煡") - @PostMapping("{userId}/release") + @PostMapping("/{userId}/release") fun releaseNotice( - @PathVariable("userId") userId: String, - @RequestBody notice: NotificationVo + @ApiParam("鐢ㄦ埛id") @PathVariable("userId") userId: String, + @ApiParam("閫氱煡") @RequestBody notice: NotificationVo ) = notificationService.releaseNotice(userId, notice) + + @ApiOperation(value = "鎺ㄩ�佷竴鏉″井淇¤闃呮秷鎭�") + @GetMapping("/wx/message/subscribe/send") + fun pushMsgWx( + @ApiParam("妯℃澘id") @RequestParam("templateId") templateId: Int + ) = notificationService.pushMsgWx(templateId) } \ No newline at end of file -- Gitblit v1.9.3