| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.pojo.AirconditionerParam; |
| | | import com.whyc.pojo.Response; |
| | | import com.whyc.service.AirconditionerParamService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "空调") |
| | | @RestController |
| | | @RequestMapping("envirState") |
| | | @RequestMapping("envirParam") |
| | | public class AirconditionerParamController { |
| | | @Autowired |
| | | private AirconditionerParamService service; |
| | | |
| | | |
| | | @ApiOperation(value = "读取参数-空调") |
| | | @GetMapping("searchAir") |
| | | public Response searchAir(@RequestParam int devId){ |
| | | return service.searchAir(devId); |
| | | } |
| | | |
| | | @ApiOperation(value = "设置参数-空调") |
| | | @PostMapping("updateAir") |
| | | public Response updateAir(@RequestBody AirconditionerParam param) { |
| | | return service.updateAir(param); |
| | | } |
| | | |
| | | @ApiOperation(value = "设置参数-空调-控制") |
| | | @PostMapping("updateAirStartTest") |
| | | public Response updateAirStartTest(@RequestParam int devId,@RequestParam int opCmd) { |
| | | return service.updateAirStartTest(devId,opCmd); |
| | | } |
| | | } |