优化兼容接口
This commit is contained in:
@@ -99,7 +99,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||
HashMap<String, DeviceChannel> channelsInStore = new HashMap<>();
|
||||
Device device = deviceMapper.getDeviceByDeviceId(deviceId);
|
||||
if (channels != null && channels.size() > 0) {
|
||||
List<DeviceChannel> channelList = channelMapper.queryChannels(deviceId, null, null, null, null);
|
||||
List<DeviceChannel> channelList = channelMapper.queryChannels(deviceId, null, null, null, null,null);
|
||||
if (channelList.size() == 0) {
|
||||
for (DeviceChannel channel : channels) {
|
||||
channel.setDeviceId(deviceId);
|
||||
|
||||
@@ -408,7 +408,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
if (parentId.length() < 14 ) {
|
||||
return null;
|
||||
}
|
||||
List<DeviceChannel> deviceChannels = deviceChannelMapper.queryChannels(deviceId, parentId, null, null, null);
|
||||
List<DeviceChannel> deviceChannels = deviceChannelMapper.queryChannels(deviceId, parentId, null, null, null,null);
|
||||
List<BaseTree<DeviceChannel>> trees = transportChannelsToTree(deviceChannels, parentId);
|
||||
return trees;
|
||||
}
|
||||
@@ -453,7 +453,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
if (parentId.length() < 14 ) {
|
||||
return null;
|
||||
}
|
||||
List<DeviceChannel> deviceChannels = deviceChannelMapper.queryChannels(deviceId, parentId, null, null, null);
|
||||
List<DeviceChannel> deviceChannels = deviceChannelMapper.queryChannels(deviceId, parentId, null, null, null,null);
|
||||
return deviceChannels;
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
}
|
||||
}else {
|
||||
if (haveChannel) {
|
||||
List<DeviceChannel> deviceChannels = deviceChannelMapper.queryChannels(deviceId, null, null, null, null);
|
||||
List<DeviceChannel> deviceChannels = deviceChannelMapper.queryChannels(deviceId, null, null, null, null,null);
|
||||
if (deviceChannels != null && deviceChannels.size() > 0) {
|
||||
result.addAll(deviceChannels);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user