From 9867f6d5c5bccfe52b878c344c536905dd6b309e Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期四, 09 六月 2022 08:48:06 +0800 Subject: [PATCH] 1. 接口文档自动输出 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NotificationController.kt | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 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..0382f15 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,35 @@ @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") fun releaseNotice( - @PathVariable("userId") userId: String, - @RequestBody notice: NotificationVo + @ApiParam("鐢ㄦ埛id") @PathVariable("userId") userId: String, + @ApiParam("閫氱煡") @RequestBody notice: NotificationVo ) = notificationService.releaseNotice(userId, notice) } \ No newline at end of file -- Gitblit v1.9.3