|
|
@@ -114,9 +114,6 @@ public class IotDeviceServiceImpl implements IIotDeviceService
|
|
|
throw new IotBizException(ErrorCode.INVALID_PARAMETER.getCode(),"该设备已存在:"+devCodeExist);
|
|
|
}
|
|
|
|
|
|
- IotDevice selectIotDevice = new IotDevice();
|
|
|
- selectIotDevice.setDevtypeBid(devtypeBid);
|
|
|
-
|
|
|
List<IotDevice> insertIotDeviceList = new ArrayList<>();
|
|
|
for (String devCode : devCodeList) {
|
|
|
IotDevice iotDevice = new IotDevice();
|
|
|
@@ -381,7 +378,10 @@ public class IotDeviceServiceImpl implements IIotDeviceService
|
|
|
Set<String> devTopicSet = new HashSet<>();
|
|
|
for(IotDevice iotDevice : iotDeviceList){
|
|
|
devCodeSet.add(iotDevice.getDevtypeBid() + iotDevice.getDevCode());
|
|
|
- devTopicSet.add(IotMqttConstant.getReportTopicByDevtype(iotDevice.getDevtypeBid()));
|
|
|
+ String topic = IotMqttConstant.getReportTopicByDevtype(iotDevice.getDevtypeBid());
|
|
|
+ if(StringUtils.isNotEmpty(topic)){
|
|
|
+ devTopicSet.add(IotMqttConstant.getReportTopicByDevtype(iotDevice.getDevtypeBid()));
|
|
|
+ }
|
|
|
}
|
|
|
String topic = IotMqttConstant.getReportTopicByDevtype(devtypeBid);
|
|
|
for(String code : devCode){
|