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/HazardousWasteController.kt | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/HazardousWasteController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/HazardousWasteController.kt index 518698d..3339361 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/HazardousWasteController.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/HazardousWasteController.kt @@ -3,6 +3,7 @@ import cn.flightfeather.supervision.lightshare.service.HazardousWasteService import io.swagger.annotations.Api import io.swagger.annotations.ApiOperation +import io.swagger.annotations.ApiParam import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RequestParam @@ -15,12 +16,12 @@ @ApiOperation(value = "鑾峰彇鐢ㄦ埛鎵�灞炰紒涓氱殑鍗卞簾澶囨淇℃伅") @GetMapping("/file") - fun getFile(@RequestParam("userId") userId: String) = hazardousWasteService.getFile(userId) + fun getFile(@ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String) = hazardousWasteService.getFile(userId) @ApiOperation(value = "鑾峰彇鐢ㄦ埛鎵�灞炰紒涓氱殑鍗卞簾澶勭疆璁板綍") @GetMapping("/record") fun getRecord( - @RequestParam("userId") userId: String, - @RequestParam(value = "year", required = false) year: String? + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String, + @ApiParam(value = "骞翠唤") @RequestParam(value = "year", required = false) year: String? ) = hazardousWasteService.getRecord(userId, year) } \ No newline at end of file -- Gitblit v1.9.3