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/DeviceController.kt | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt index 418d5a7..5f77ef5 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt @@ -15,46 +15,47 @@ @ApiOperation(value = "鑾峰彇鍑�鍖栬澶囦俊鎭�") @GetMapping("/purify/info") fun getPurifyDeviceInfo( - @RequestParam("userId") userId: String + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String ) = deviceService.getPurifyDeviceInfo(userId) @ApiOperation(value = "鑾峰彇鐩戞祴璁惧淇℃伅") @GetMapping("/monitor/info") fun getMonitorDeviceInfo( - @RequestParam("userId") userId: String + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String ) = deviceService.getMonitorDeviceInfo(userId) @ApiOperation(value = "鑾峰彇鐢ㄦ埛鐩戞祴璁惧鐨勫垎閽熸暟鎹�", notes = "鐩墠榛樿杩斿洖鏈�鏂扮殑15鏉℃暟鎹紝鎸夋椂闂村崌搴忔帓鍒�") @GetMapping("/min/value") fun getLatestMinuteValue( - @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String ) = deviceService.getLatestMinuteValue(userId) @ApiOperation(value = "鑾峰彇鐢ㄦ埛鐩戞祴璁惧鐨勫皬鏃舵暟鎹�", notes = "榛樿杩斿洖鏈�鏂扮殑15灏忔椂鏁版嵁, 鎸夋椂闂村崌搴忔帓鍒�") @GetMapping("/hour/value") fun getLatestHourValue( - @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String ) = deviceService.getLatestHourValue(userId) + @ApiOperation(value = "鑾峰彇鏈堝害鍧囧�兼暟鎹�") @PostMapping("/avg/mon/value") fun getMonAvgData( - @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String, - @ApiParam(value = "鏃堕棿") @RequestBody timeList: List<DateVo> + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String, + @ApiParam(value = "鏃堕棿") @RequestBody timeList: List<DateVo> ) = deviceService.getMonAvgData(userId, timeList) @ApiOperation(value = "鑾峰彇鐢ㄦ埛鐩戞祴璁惧鐨勫巻鍙叉暟鎹�", notes = "") @GetMapping("/history/value") fun getHistoryValue( - @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String, - @ApiParam(value = "寮�濮嬫椂闂�", example = "yyyy-MM-dd HH:mm") @RequestParam("startTime") startTime: String, - @ApiParam(value = "缁撴潫鏃堕棿", example = "yyyy-MM-dd HH:mm") @RequestParam("endTime") endTime: String, - @ApiParam(value = "閲囨牱鍛ㄦ湡, 0锛氬垎閽熷潎鍊�;1锛氬皬鏃跺潎鍊�;(鐩墠鍙敮鎸佸垎閽熷潎鍊�)", allowableValues = "0") @RequestParam("period") period: Byte + @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String, + @ApiParam(value = "寮�濮嬫椂闂�", example = "yyyy-MM-dd HH:mm") @RequestParam("startTime") startTime: String, + @ApiParam(value = "缁撴潫鏃堕棿", example = "yyyy-MM-dd HH:mm") @RequestParam("endTime") endTime: String, + @ApiParam(value = "閲囨牱鍛ㄦ湡", example = "0锛氬垎閽熷潎鍊硷紱1锛氬皬鏃跺潎鍊�;(鐩墠鍙敮鎸佸垎閽熷潎鍊�)") @RequestParam("period") period: Byte ) = deviceService.getHistoryValue(userId, startTime, endTime, period) @ApiOperation(value = "鑾峰彇姣忎釜鐩戞祴璁惧鐨勬渶鏂板垎閽熸暟鎹�", notes = "") @GetMapping("/min/value/real_time") fun getRealTimeData( - @ApiParam(value = "椤垫暟") @RequestParam("page") page: Int, - @ApiParam(value = "姣忛〉鏁版嵁閲�") @RequestParam("per_page") perPage: Int + @ApiParam(value = "椤垫暟") @RequestParam("page") page: Int, + @ApiParam(value = "姣忛〉鏁版嵁閲�") @RequestParam("per_page") perPage: Int ) = deviceService.getRealTimeData(page, perPage) } \ No newline at end of file -- Gitblit v1.9.3