优化点播流程

结构优化
648540858 2024-01-31 10:49:50 +08:00
parent 3e1bf69181
commit 9d9681c663
3 changed files with 5 additions and 6 deletions

View File

@ -78,11 +78,11 @@ public class GB28181ResourceServiceImpl implements IResourceService {
CheckCommonGbChannelResult checkResult = checkCommonGbChannel(commonGbChannel); CheckCommonGbChannelResult checkResult = checkCommonGbChannel(commonGbChannel);
if (checkResult.errorMsg != null) { if (checkResult.errorMsg != null) {
callback.call(commonGbChannel, null, ErrorCode.SUCCESS.getCode(), checkResult.errorMsg, null); callback.call(commonGbChannel, null, ErrorCode.ERROR100.getCode(), checkResult.errorMsg, null);
return; return;
} }
if (checkResult.device == null || checkResult.channel == null) { if (checkResult.device == null || checkResult.channel == null) {
callback.call(commonGbChannel, null, ErrorCode.SUCCESS.getCode(), "设备获取失败", null); callback.call(commonGbChannel, null, ErrorCode.ERROR100.getCode(), "设备获取失败", null);
return; return;
} }
@ -102,11 +102,11 @@ public class GB28181ResourceServiceImpl implements IResourceService {
CheckCommonGbChannelResult checkResult = checkCommonGbChannel(commonGbChannel); CheckCommonGbChannelResult checkResult = checkCommonGbChannel(commonGbChannel);
if (checkResult.errorMsg != null) { if (checkResult.errorMsg != null) {
callback.call(commonGbChannel, null, ErrorCode.SUCCESS.getCode(), checkResult.errorMsg, null); callback.call(commonGbChannel, null, ErrorCode.ERROR100.getCode(), checkResult.errorMsg, null);
return; return;
} }
if (checkResult.device == null || checkResult.channel == null) { if (checkResult.device == null || checkResult.channel == null) {
callback.call(commonGbChannel, null, ErrorCode.SUCCESS.getCode(), "设备获取失败", null); callback.call(commonGbChannel, null, ErrorCode.ERROR100.getCode(), "设备获取失败", null);
return; return;
} }
try { try {

View File

@ -559,7 +559,6 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
}); });
} }
if(CollectionUtils.isEmpty(channels)){ if(CollectionUtils.isEmpty(channels)){
logger.info("通道重设,数据为空={}" , deviceChannelList); logger.info("通道重设,数据为空={}" , deviceChannelList);
return false; return false;

View File

@ -206,8 +206,8 @@ public class CommonChannelController {
streamInfo.changeStreamIp(host); streamInfo.changeStreamIp(host);
} }
wvpResult.setData(new StreamContent(streamInfo)); wvpResult.setData(new StreamContent(streamInfo));
result.setResult(wvpResult);
} }
result.setResult(wvpResult);
}else { }else {
WVPResult<StreamContent> wvpResult = new WVPResult<>(); WVPResult<StreamContent> wvpResult = new WVPResult<>();
wvpResult.setCode(code); wvpResult.setCode(code);