临时提交
This commit is contained in:
@@ -511,10 +511,10 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||
if (i + limitCount > addChannels.size()) {
|
||||
toIndex = addChannels.size();
|
||||
}
|
||||
result = result || channelMapper.batchAdd(addChannels.subList(i, toIndex)) < 0;
|
||||
result = result || channelMapper.batchAdd(addChannels.subList(i, toIndex)) > 0;
|
||||
}
|
||||
}else {
|
||||
result = result || channelMapper.batchAdd(addChannels) < 0;
|
||||
result = channelMapper.batchAdd(addChannels) > 0;
|
||||
}
|
||||
}
|
||||
if (!result && !updateChannels.isEmpty()) {
|
||||
@@ -524,14 +524,13 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||
if (i + limitCount > updateChannels.size()) {
|
||||
toIndex = updateChannels.size();
|
||||
}
|
||||
result = result || channelMapper.batchUpdate(updateChannels.subList(i, toIndex)) < 0;
|
||||
result = result || channelMapper.batchUpdate(updateChannels.subList(i, toIndex)) > 0;
|
||||
}
|
||||
}else {
|
||||
result = result || channelMapper.batchUpdate(updateChannels) < 0;
|
||||
result = channelMapper.batchUpdate(updateChannels) > 0;
|
||||
}
|
||||
}
|
||||
if (!result && !deleteChannels.isEmpty()) {
|
||||
System.out.println("删除: " + deleteChannels.size());
|
||||
if (deleteChannels.size() > limitCount) {
|
||||
for (int i = 0; i < deleteChannels.size(); i += limitCount) {
|
||||
int toIndex = i + limitCount;
|
||||
@@ -541,11 +540,10 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||
result = result || channelMapper.batchDel(deleteChannels.subList(i, toIndex)) < 0;
|
||||
}
|
||||
}else {
|
||||
result = result || channelMapper.batchDel(deleteChannels) < 0;
|
||||
result = channelMapper.batchDel(deleteChannels) < 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -640,7 +640,6 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||
inviteInfo.setStatus(InviteSessionStatus.ok);
|
||||
ResponseEvent responseEvent = (ResponseEvent) eventResult.event;
|
||||
String contentString = new String(responseEvent.getResponse().getRawContent());
|
||||
System.out.println(contentString);
|
||||
String ssrcInResponse = SipUtils.getSsrcFromSdp(contentString);
|
||||
// 兼容回复的消息中缺少ssrc(y字段)的情况
|
||||
if (ssrcInResponse == null) {
|
||||
|
||||
@@ -175,6 +175,7 @@ public class RegionServiceImpl implements IRegionService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean batchAdd(List<Region> regionList) {
|
||||
if (regionList== null || regionList.isEmpty()) {
|
||||
return false;
|
||||
@@ -190,7 +191,12 @@ public class RegionServiceImpl implements IRegionService {
|
||||
regionMapForVerification.remove(region.getDeviceId());
|
||||
}
|
||||
}
|
||||
regionMapper.batchAdd(new ArrayList<>(regionMapForVerification.values()));
|
||||
return false;
|
||||
if (!regionMapForVerification.isEmpty()) {
|
||||
List<Region> regions = new ArrayList<>(regionMapForVerification.values());
|
||||
regionMapper.batchAdd(regions);
|
||||
regionMapper.updateParentId(regions);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user