package com.newfiber.api.pc.controller; import com.newfiber.api.core.commons.ResultCode; import com.newfiber.api.core.commons.ResultObj; import com.newfiber.api.pc.model.vo.WaterLevelMonitorVo; import com.newfiber.api.pc.service.TempDataService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @description: TODO * @author: 张鸿志 * @date: 2021/1/7 17:14 * @version: v1.0 */ @RestController @RequestMapping("/tempData") @Api(value = "TempDataController",tags = "水位监测控制层") public class TempDataController { @Autowired private TempDataService tempDataService; @PostMapping("/queryData") @ApiOperation("获取水位监测的数据") public ResultObj<WaterLevelMonitorVo> selectData(){ return new ResultObj<WaterLevelMonitorVo>(ResultCode.OK,tempDataService.selectData()); } }