| | |
| | | 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); |
| | | } |
| | | |
| | | } |