补充文档, 修复通道查询错误
This commit is contained in:
@@ -58,7 +58,7 @@ public class DeviceChannelProvider {
|
||||
public String queryChannels(Map<String, Object> params ){
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
sqlBuild.append(getBaseSelectSql());
|
||||
sqlBuild.append(" where 1=1");
|
||||
sqlBuild.append(" where dc.device_db_id = #{deviceDbId}");
|
||||
if (params.get("query") != null) {
|
||||
sqlBuild.append(" AND coalesce(dc.gb_device_id, dc.device_id) LIKE concat('%',#{query},'%')" +
|
||||
" OR coalesce(dc.gb_name, dc.name) LIKE concat('%',#{query},'%')")
|
||||
|
||||
@@ -246,6 +246,31 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void unregister(Platform platform) {
|
||||
// 停止心跳定时
|
||||
final String keepaliveTaskKey = KEEPALIVE_KEY_PREFIX + platform.getServerGBId();
|
||||
dynamicTask.stop(keepaliveTaskKey);
|
||||
// 停止注册定时
|
||||
final String registerTaskKey = REGISTER_KEY_PREFIX + platform.getServerGBId();
|
||||
dynamicTask.stop(registerTaskKey);
|
||||
|
||||
PlatformCatch platformCatchOld = redisCatchStorage.queryPlatformCatchInfo(platform.getServerGBId());
|
||||
// 注销旧的
|
||||
try {
|
||||
if (platform.isStatus()) {
|
||||
commanderForPlatform.unregister(platform, platformCatchOld.getSipTransactionInfo(), null, eventResult -> {
|
||||
log.info("[国标级联] 注销命令发送成功,平台:{}", platform.getServerGBId());
|
||||
});
|
||||
}
|
||||
} catch (InvalidArgumentException | ParseException | SipException e) {
|
||||
log.error("[命令发送失败] 国标级联 注销: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void register(Platform platform) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void online(Platform platform, SipTransactionInfo sipTransactionInfo) {
|
||||
|
||||
Reference in New Issue
Block a user