修复默认新建设备未设置节点策略的BUG

pull/1652/head
648540858 2024-10-21 09:27:36 +08:00
parent 7d669f74ec
commit 36409eb34c
4 changed files with 8 additions and 7 deletions

View File

@ -59,6 +59,7 @@ public interface DeviceMapper {
"firmware, " +
"transport," +
"stream_mode," +
"media_server_id," +
"ip," +
"sdp_ip," +
"local_ip," +
@ -88,6 +89,7 @@ public interface DeviceMapper {
"#{firmware}," +
"#{transport}," +
"#{streamMode}," +
"#{mediaServerId}," +
"#{ip}," +
"#{sdpIp}," +
"#{localIp}," +

View File

@ -168,15 +168,13 @@ public class DeviceServiceImpl implements IDeviceService {
}
}else {
if (deviceChannelMapper.queryChannelsByDeviceDbId(device.getId()).isEmpty()) {
log.info("[设备上线]: {}通道数为0,查询通道信息", device.getDeviceId());
sync(device);
}
deviceMapper.update(device);
redisCatchStorage.updateDevice(device);
}
if (deviceChannelMapper.queryChannelsByDeviceDbId(device.getId()).isEmpty()) {
log.info("[设备上线]: {}通道数为0,查询通道信息", device.getDeviceId());
sync(device);
}
}
// 刷新过期任务

View File

@ -172,6 +172,7 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
device.setStreamMode("UDP");
device.setCharset("GB2312");
device.setGeoCoordSys("WGS84");
device.setMediaServerId("auto");
device.setDeviceId(deviceId);
device.setOnLine(false);
}else {

View File

@ -25,7 +25,7 @@ create table wvp_device
charset character varying(50),
ssrc_check bool default false,
geo_coord_sys character varying(50),
media_server_id character varying(50),
media_server_id character varying(50) default 'auto',
custom_name character varying(255),
sdp_ip character varying(50),
local_ip character varying(50),