From 8c189b243bfbbacb2ab1ce79f4e1ff22708f125a Mon Sep 17 00:00:00 2001 From: whycxzp <perryhsu@163.com> Date: 星期一, 26 七月 2021 16:45:09 +0800 Subject: [PATCH] 修复接口 --- src/main/java/com/whyc/controller/RectifierPowerCtrlController.java | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/whyc/controller/RectifierPowerCtrlController.java b/src/main/java/com/whyc/controller/RectifierPowerCtrlController.java index a8251d7..99663a3 100644 --- a/src/main/java/com/whyc/controller/RectifierPowerCtrlController.java +++ b/src/main/java/com/whyc/controller/RectifierPowerCtrlController.java @@ -1,13 +1,35 @@ package com.whyc.controller; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.whyc.dto.Response; +import com.whyc.pojo.RectifierPowerControl; +import com.whyc.service.RectifierPowerCtrlService; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("rectifierPowerCtrl") -@Api(tags = "澶у姛鐜囨暣娴佺數婧�-鎺у埗鐘舵��") +@Api(tags = "澶у姛鐜囨暣娴佺數婧�-鎺у埗") public class RectifierPowerCtrlController { + @Autowired + private RectifierPowerCtrlService service; + + @GetMapping("all") + @ApiOperation(value = "鑾峰彇鎵�鏈変俊鎭�") + public Response<IPage<RectifierPowerControl>> getAll(@RequestParam int pageNum, int pageSize){ + return service.getAll(pageNum,pageSize); + } + + @GetMapping("infoByDevId") + @ApiOperation(value = "鑾峰彇鍗曚釜淇℃伅:鏍规嵁璁惧id") + public Response<RectifierPowerControl> getInfoByDevId(@RequestParam int devId){ + return service.getInfoByDevId(devId); + } } -- Gitblit v1.9.1