Commit 312698f8 authored by xieshaojun's avatar xieshaojun

Merge branch 'master' into feature-offline_cache

# Conflicts:
#	src/main/java/vc/thinker/web/CentralAirController.java
parents e80a7767 b1a1cc75
......@@ -17,16 +17,15 @@ import vc.thinker.config.entity.DataReportArrayQueue;
import vc.thinker.config.interceptor.ServiceLimit;
import vc.thinker.mqtt.forwardthinker.ThinkerProdProtocolClient;
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;
import java.util.concurrent.ArrayBlockingQueue;
/**
* @author HeTongHao
* @since 2022/8/9 15:56
......@@ -50,7 +49,7 @@ public class CentralAirController {
public SimpleResponse dataReport(@RequestBody @Valid TerminalDataReportVO reportVO) throws MqttException {
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())
......@@ -69,10 +68,10 @@ public class CentralAirController {
}
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