From d5cf76188ad37f062f37ebce3464097203b4db05 Mon Sep 17 00:00:00 2001 From: whycxzp <perryhsu@163.com> Date: 星期二, 12 十月 2021 15:56:48 +0800 Subject: [PATCH] 去除电池状态-均充 --- src/main/java/com/whyc/controller/ApplicationController.java | 36 +++++++++++++++++++++++++++++++----- 1 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/whyc/controller/ApplicationController.java b/src/main/java/com/whyc/controller/ApplicationController.java index 23a625b..57fb736 100644 --- a/src/main/java/com/whyc/controller/ApplicationController.java +++ b/src/main/java/com/whyc/controller/ApplicationController.java @@ -1,6 +1,7 @@ package com.whyc.controller; import com.whyc.dto.ApplicationConfigDTO; +import com.whyc.dto.ApplicationDTO; import com.whyc.dto.Response; import com.whyc.pojo.Application; import com.whyc.pojo.ApplicationConfig; @@ -23,6 +24,7 @@ @Autowired private ApplicationService service; + /*======搴旂敤绠$悊======*/ @PostMapping @ApiOperation(value = "搴旂敤-鍒涘缓") public Response create(@RequestBody Application app){ @@ -31,10 +33,13 @@ @GetMapping("all") @ApiOperation(value = "搴旂敤-鏌ヨ鎵�鏈�") - public Response getAll(){ - return service.getAll(); + public Response getAll(@RequestParam Integer userId){ + return service.getAll(userId); } + /** + * 濡傛灉鏇存柊鐨勪负榛樿甯冨眬,鍒欏鍒堕粯璁ゅ竷灞�涓哄綋鍓嶇敤鎴峰竷灞� + */ @PutMapping @ApiOperation(value = "搴旂敤-鏇存柊鍚嶇О") public Response update(@RequestBody Application app){ @@ -43,11 +48,31 @@ @DeleteMapping @ApiOperation(value = "搴旂敤-鍒犻櫎") - public Response delete(@RequestBody Application app){ - return service.delete(app); + public Response delete(@RequestParam Integer appId){ + return service.delete(appId); + } + + @PutMapping("active") + @ApiOperation(value = "搴旂敤-璁剧疆婵�娲�") + public Response updateActive(@RequestBody Application app){ + return service.updateActive(app); + } + + /** + * 閽堝姣忎釜鐢ㄦ埛鐨�<榛樿搴旂敤甯冨眬>杩欎竴鍔熻兘,鏌ヨ鏃�,濡傛灉娌℃湁婵�娲荤殑搴旂敤,鍒欏睍绀� 榛樿搴旂敤甯冨眬 + */ + @GetMapping("active") + @ApiOperation(value = "搴旂敤-鏌ヨ褰撳墠婵�娲�") + public Response getActive(@RequestParam Integer userId){ + return service.getActive(userId); } /*======搴旂敤閰嶇疆======*/ + /** + * 涓嶅厑璁竌ppId=0鐨勫簲鐢ㄨ繘琛屼慨鏀�,闇�瑕佸厛閲嶅懡鍚嶅簲鐢� + * @param configDTO + * @return + */ @PostMapping("config") @ApiOperation(value = "閰嶇疆-淇濆瓨褰撳墠搴旂敤鐨勯厤缃�") public Response saveConfig(@RequestBody ApplicationConfigDTO configDTO){ @@ -57,7 +82,8 @@ @GetMapping("allConfig") @ApiOperation(value = "閰嶇疆-鏌ヨ褰撳墠搴旂敤鐨勯厤缃�") - public Response getAllConfig(@RequestParam int appId){ + public Response getAllConfig(@RequestParam Integer appId){ return service.getAllConfig(appId); } + } -- Gitblit v1.9.1