From c93ad66797e4830ccf4de81c1e8787ab90b22791 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期一, 04 七月 2022 16:07:28 +0800 Subject: [PATCH] 1. 承诺书pdf生产模块 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LawController.kt | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LawController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LawController.kt index 4968b37..0b9ecf7 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LawController.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/LawController.kt @@ -3,6 +3,8 @@ import cn.flightfeather.supervision.lightshare.service.LawService import cn.flightfeather.supervision.lightshare.vo.LawsRegulationsCondition 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 @@ -11,30 +13,34 @@ @RequestMapping("/laws") class LawController(val lawService: LawService) { + @ApiOperation(value = "鑾峰彇鎵�鏈夋硶寰嬫硶瑙�") @GetMapping fun getLaws( - @RequestParam(value = "page") page: Int, - @RequestParam(value = "per_page") perPage: Int, - response: HttpServletResponse + @ApiParam(value = "椤电爜") @RequestParam(value = "page") page: Int, + @ApiParam(value = "鍗曢〉鏁版嵁閲�") @RequestParam(value = "per_page") perPage: Int, + response: HttpServletResponse ) = lawService.getLaws(page, perPage, response) + @ApiOperation(value = "鏍规嵁id鏌ユ壘娉曞緥娉曡") @GetMapping("/text") fun getLawText( - @RequestParam(value = "id") lawId: String + @ApiParam(value = "娉曞緥娉曡璁板綍id") @RequestParam(value = "id") lawId: String ) = lawService.getLawText(lawId) + @ApiOperation(value = "鏌ユ壘娉曞緥娉曡") @PostMapping("/condition/{userId}") fun getLawsRegulations( - @PathVariable userId: String, - @RequestBody condition: LawsRegulationsCondition, - @RequestParam(value = "page") page: Int, - @RequestParam(value = "per_page") perPage: Int, - response: HttpServletResponse + @ApiParam(value = "鐢ㄦ埛鐨刬d") @PathVariable userId: String, + @ApiParam(value = "鏌ユ壘鏉′欢") @RequestBody condition: LawsRegulationsCondition, + @ApiParam(value = "椤电爜") @RequestParam(value = "page") page: Int, + @ApiParam(value = "鍗曢〉鏁版嵁閲�") @RequestParam(value = "per_page") perPage: Int, + response: HttpServletResponse ) = lawService.getLawsRegulations(condition, page, perPage, response) + @ApiOperation(value = "鏍规嵁琛屼笟绫诲瀷鏌ユ壘鐩稿叧娉曞緥娉曡") @PostMapping("/eachType/{userId}") fun getLawsRegulationsWithEachType( - @PathVariable userId: String, - @RequestBody condition: LawsRegulationsCondition + @ApiParam(value = "鐢ㄦ埛id") @PathVariable userId: String, + @ApiParam(value = "鏌ユ壘鏉′欢") @RequestBody condition: LawsRegulationsCondition ) = lawService.getLawsRegulationsWithEachType(condition) } \ No newline at end of file -- Gitblit v1.9.3