临时提交

结构优化
648540858 2024-01-19 11:06:45 +08:00
parent f0e9c85c85
commit 481c88f517
2 changed files with 8 additions and 23 deletions

View File

@ -29,8 +29,6 @@ public class StreamProxy {
private String rtpType;
@Schema(description = "代理失败的原因")
private String proxyError;
@Schema(description = "是否启用")
private boolean enable;
@Schema(description = "是否启用音频")
private boolean enableAudio;
@Schema(description = "是否录制")
@ -53,8 +51,10 @@ public class StreamProxy {
private double longitude;
@Schema(description = "纬度")
private double latitude;
@Schema(description = "状态")
private boolean status;
@Schema(description = "正在拉流")
private boolean pulling;
@Schema(description = "拉流时间")
private String pullTime;
@Schema(description = "创建时间")
private String createTime;
@Schema(description = "更新时间")
@ -226,14 +226,6 @@ public class StreamProxy {
this.latitude = latitude;
}
public boolean isStatus() {
return status;
}
public void setStatus(boolean status) {
this.status = status;
}
public String getCreateTime() {
return createTime;
}

View File

@ -241,7 +241,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
param.setProxyError(msg);
param.setStatus(false);
}
addProxyToDb(param);
// updateStatusById(param.get);
});
});
}
@ -489,17 +489,14 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
if (streamProxyInDb.getCommonGbChannelId() > 0) {
commonGbChannelService.deleteById(streamProxyInDb.getCommonGbChannelId());
}
}
if (!ObjectUtils.isEmpty(param.getGbId())
}else if (!ObjectUtils.isEmpty(param.getGbId())
&& ObjectUtils.isEmpty(streamProxyInDb.getGbId())) {
CommonGbChannel commonGbChannel = CommonGbChannel.getInstance(param);
// 国标ID已经添加
if (commonGbChannelService.add(commonGbChannel) > 0) {
param.setCommonGbChannelId(commonGbChannel.getCommonGbId());
}
}
if (param.getGbId() != null && streamProxyInDb.getGbId() != null
&& !param.getGbId().equals(streamProxyInDb.getGbId())) {
}else {
CommonGbChannel commonGbChannel = CommonGbChannel.getInstance(param);
commonGbChannel.setCommonGbId(streamProxyInDb.getCommonGbChannelId());
// 国标ID已经改变
@ -525,7 +522,6 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
}else {
return null;
}
}
}
return null;
@ -717,7 +713,6 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
}else {
commonGbChannelService.offlineForList(ids);
}
}
}
@ -765,9 +760,7 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
if (streamProxy == null) {
return;
}
if (streamProxy.getCommonGbChannelId() > 0) {
updateStatusById(streamProxy, status);
}
updateStatusById(streamProxy, status);
}
private void syncPullStream(String mediaServerId){