Commit b1a1cc75 authored by xieshaojun's avatar xieshaojun

更新代码

parent a79b1962
......@@ -12,14 +12,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import vc.thinker.config.interceptor.ServiceLimit;
import vc.thinker.response.SimpleResponse;
import vc.thinker.thirdpartyproxy.ProtocolType;
import vc.thinker.thirdpartyproxy.protocolimpls.centralAir.CentralAirProtocol;
import vc.thinker.thirdpartyproxy.protocolimpls.centralAir.dto.DataReportInfoDTO;
import vc.thinker.thirdpartyproxy.protocolimpls.centralAir.dto.DataReportParamDTO;
import vc.thinker.web.vo.TerminalDataReportVO;
import javax.validation.Valid;
import java.util.Objects;
/**
* @author HeTongHao
......@@ -42,7 +40,7 @@ public class CentralAirController {
public SimpleResponse dataReport(@RequestBody @Valid TerminalDataReportVO reportVO) {
SimpleResponse simpleResponse = new SimpleResponse();
simpleResponse.setCode("200");
if (Objects.equals(reportVO.getProtocolCode(),ProtocolType.central_air_conditioning.getCode())){
//if (Objects.equals(reportVO.getProtocolCode(),ProtocolType.central_air_conditioning.getCode())){
DataReportInfoDTO dto = DataReportInfoDTO.builder()
.protocolCode(reportVO.getProtocolCode())
//.deviceAddress(reportVO.getDeviceAddress())
......@@ -53,10 +51,10 @@ public class CentralAirController {
simpleResponse.setSuccess(true);
simpleResponse.setMessage("处理成功");
return simpleResponse;
}
simpleResponse.setSuccess(false);
simpleResponse.setMessage("处理失败");
return simpleResponse;
//}
// simpleResponse.setSuccess(false);
// simpleResponse.setMessage("处理失败");
// return simpleResponse;
}
}
......@@ -21,7 +21,8 @@ public class TerminalDataReportVO implements Serializable {
private static final long serialVersionUID = -3628045573564814316L;
@ApiModelProperty("协议编码")
@ValidatorEnum(message = "协议类型不支持",enumClass = ProtocolType.class)
@NotNull(message = "协议编码不允许为空")
// @ValidatorEnum(message = "协议类型不支持",enumClass = ProtocolType.class)
private String protocolCode;
// @ApiModelProperty("网关下设备唯一地址")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment