修改平台名称
parent
5db9033372
commit
5cd509b644
|
@ -93,7 +93,7 @@ public interface PlatformMapper {
|
|||
int updateStatus(@Param("platformGbID") String platformGbID, @Param("online") boolean online);
|
||||
|
||||
@Select("SELECT server_id FROM wvp_platform WHERE enable=true and server_id != #{serverId} group by server_id")
|
||||
List<String> queryServerIdsWithEnable(@Param("serverId") String serverId);
|
||||
List<String> queryServerIdsWithEnableAndNotInServer(@Param("serverId") String serverId);
|
||||
|
||||
@Select("SELECT * FROM wvp_platform WHERE server_id == #{serverId}")
|
||||
List<Platform> queryByServerId(@Param("serverId") String serverId);
|
||||
|
|
|
@ -112,11 +112,12 @@ public class PlatformServiceImpl implements IPlatformService {
|
|||
return;
|
||||
}
|
||||
// 查找非平台的国标级联执行服务Id
|
||||
List<String> serverIds = platformMapper.queryServerIdsWithEnable(userSetting.getServerId());
|
||||
List<String> serverIds = platformMapper.queryServerIdsWithEnableAndNotInServer(userSetting.getServerId());
|
||||
if (serverIds == null || serverIds.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
serverIds.forEach(serverId -> {
|
||||
log.info("[集群] 检测到 {} 已离线", serverId);
|
||||
// 检查每个是否存活
|
||||
ServerInfo serverInfo = redisCatchStorage.queryServerInfo(serverId);
|
||||
if (serverInfo == null && userSetting.getServerId().equals(redisCatchStorage.chooseOneServer())) {
|
||||
|
|
|
@ -255,6 +255,8 @@ user-settings:
|
|||
gb-device-online: 0
|
||||
# 登录超时时间(分钟),
|
||||
login-timeout: 30
|
||||
# wvp集群模式下如果注册向上级的wvp奔溃,则自动选择一个其他wvp继续注册到上级
|
||||
auto-register-platform: true
|
||||
|
||||
# 关闭在线文档(生产环境建议关闭)
|
||||
springdoc:
|
||||
|
|
Loading…
Reference in New Issue