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/EvaluationsubruleController.kt |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt
index b5bb823..795ef11 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationsubruleController.kt
@@ -3,26 +3,41 @@
 import cn.flightfeather.supervision.domain.entity.Evaluationsubrule
 import cn.flightfeather.supervision.lightshare.service.EvaluationsubruleService
 import io.swagger.annotations.Api
+import io.swagger.annotations.ApiOperation
+import io.swagger.annotations.ApiParam
 import org.springframework.web.bind.annotation.*
+import springfox.documentation.annotations.ApiIgnore
 
 @Api(tags = ["璇勫垎瀛愯鍒橝PI鎺ュ彛"])
 @RestController
 @RequestMapping("/evaluationsubrule")
 class EvaluationsubruleController (val evaluationsubruleService: EvaluationsubruleService) {
+    @ApiOperation(value = "鑾峰彇鎵�鏈夎瘎鍒嗚鍒欏瓙椤硅〃")
     @GetMapping
     fun getAll() = evaluationsubruleService.findAll()
 
+    @ApiOperation(value = "涓婁紶璇勫垎瑙勫垯瀛愰」琛�")
     @PutMapping
-    fun add(@RequestBody evaluationsubrule: Evaluationsubrule) = evaluationsubruleService.save(evaluationsubrule)
+    fun add(@ApiParam(value = "璇勫垎瑙勫垯瀛愰」琛�") @RequestBody evaluationsubrule: Evaluationsubrule) = evaluationsubruleService.save(evaluationsubrule)
 
+    @ApiOperation(value = "鏇存柊璇勫垎瑙勫垯瀛愰」琛�")
     @PostMapping
-    fun update(@RequestBody evaluationsubrule: Evaluationsubrule) = evaluationsubruleService.update(evaluationsubrule)
+    fun update(@ApiParam(value = "璇勫垎瑙勫垯瀛愰」琛�") @RequestBody evaluationsubrule: Evaluationsubrule) = evaluationsubruleService.update(evaluationsubrule)
 
+    @ApiOperation(value = "鏌ユ壘璇勫垎瑙勫垯瀛愰」琛�")
     @GetMapping("/{ruleId}")
-    fun getById(@PathVariable ruleId:String) = evaluationsubruleService.findByRuleId(ruleId)
+    fun getById(@ApiParam(value = "璇勫垎瑙勫垯瀛愰」琛╥d") @PathVariable ruleId:String) = evaluationsubruleService.findByRuleId(ruleId)
 
+    @ApiIgnore
+    @ApiOperation(value = "鍒犻櫎璇勫垎瑙勫垯瀛愰」琛�")
     @DeleteMapping("/{id}")
     fun delete (@PathVariable id: String) = evaluationsubruleService.delete(id)
 
-
+    @ApiOperation(value = "鏌ユ壘璇勫垎瑙勫垯瀛愰」琛ㄤ互鍙婂搴旂殑鍏蜂綋寰楀垎")
+    @GetMapping("/score")
+    fun getScore(
+        @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId:String,
+        @ApiParam(value = "璇勪及鍛ㄦ湡", example = "yyyy/M-M") @RequestParam("time") time:String,
+        @ApiParam(value = "鍓嶇骞冲彴") @RequestParam("platform", required = false) platform:String?,
+    ) = evaluationsubruleService.getScore(userId, time, platform)
 }
\ No newline at end of file

--
Gitblit v1.9.3