From ebab5a2e4a5041d5ac08032221f24076238a33bb Mon Sep 17 00:00:00 2001 From: whycxzp <perryhsu@163.com> Date: 星期一, 29 三月 2021 11:26:18 +0800 Subject: [PATCH] 修改设备列表接口 --- src/main/java/com/whyc/controller/DeviceMaintainController.java | 38 +++++++++++++++++++++++++------------- 1 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/whyc/controller/DeviceMaintainController.java b/src/main/java/com/whyc/controller/DeviceMaintainController.java index 312ce48..a923320 100644 --- a/src/main/java/com/whyc/controller/DeviceMaintainController.java +++ b/src/main/java/com/whyc/controller/DeviceMaintainController.java @@ -1,5 +1,6 @@ package com.whyc.controller; +import com.whyc.dto.DeviceMaintainDTO; import com.whyc.dto.Response; import com.whyc.pojo.DeviceMaintain; import com.whyc.service.DeviceMaintainService; @@ -7,6 +8,15 @@ import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; + +/** + * 杩欓噷缁翠繚璁″垝鍒涘缓鍚�, + * 瀛樺湪棣栨缁翠繚鏃堕棿鍜岀淮淇濆懆鏈�,浠庣悊璁轰笂鏉ヨ,鍒涘缓浜嗕竴娆$淮淇濊鍒掑悗鏄案涔呭惊鐜敓鏁堢殑,璁″垝缁翠繚鏃堕棿涓�娆℃鎸夊懆鏈熸帹 + * 浠庤〃缁撴瀯涓婅,瀛樺湪缁翠繚璁″垝琛ㄥ拰缁翠繚璁板綍琛�; + * + * demo,閲囧彇涓�寮犺〃杩涜鍔熻兘瀹炵幇 + * + */ @RestController @RequestMapping("deviceMaintain") @@ -17,38 +27,40 @@ private DeviceMaintainService service; @GetMapping("page") - @ApiOperation(value = "鏌ヨ缁翠繚鍒嗛〉") - public Response getPageByCondition(@RequestParam Integer pageNum,@RequestParam Integer pageSize){ - return service.getPage(pageNum,pageSize); + @ApiOperation(value = "鏌ヨ璁″垝鍒嗛〉") + public Response getPageByCondition(@RequestParam Integer pageNum, @RequestParam Integer pageSize, + @RequestBody DeviceMaintainDTO maintainDTO + ) { + return service.getPageByCondition(pageNum, pageSize,maintainDTO); } @GetMapping - @ApiOperation(value = "鏌ヨ") - public Response get(@RequestParam Integer deviceId){ + @ApiOperation(value = "鏌ヨ璁″垝") + public Response get(@RequestParam Integer deviceId) { return service.get(deviceId); } @PostMapping - @ApiOperation(value = "鍒涘缓") - public Response add(@RequestBody DeviceMaintain deviceMaintain){ + @ApiOperation(value = "鍒涘缓璁″垝") + public Response add(@RequestBody DeviceMaintain deviceMaintain) { return service.add(deviceMaintain); } @PutMapping - @ApiOperation(value = "淇敼") - public Response update(@RequestBody DeviceMaintain deviceMaintain){ + @ApiOperation(value = "淇敼璁″垝") + public Response update(@RequestBody DeviceMaintain deviceMaintain) { return service.update(deviceMaintain); } @PutMapping("confirm") - @ApiOperation(value = "纭璁板綍",notes = "浼犲叆deviceId(璁惧id),actualTime(瀹為檯缁存姢鏃ユ湡),actualOwner2(瀹為檯缁存姢浜哄憳),content(涓昏缁存姢鍐呭)") - public Response confirm(@RequestBody DeviceMaintain deviceMaintain){ + @ApiOperation(value = "纭璁板綍", notes = "浼犲叆deviceId(璁惧id),actualTime(瀹為檯缁存姢鏃ユ湡),actualOwner2(瀹為檯缁存姢浜哄憳),content(涓昏缁存姢鍐呭)") + public Response confirm(@RequestBody DeviceMaintain deviceMaintain) { return service.confirm(deviceMaintain); } @GetMapping("record") - @ApiOperation(value = "鏌ヨ缁翠繚璁板綍") - public Response getRecord(@RequestParam Integer deviceId){ + @ApiOperation(value = "鏌ヨ璁板綍") + public Response getRecord(@RequestParam Integer deviceId) { return service.getRecord(deviceId); } -- Gitblit v1.9.1