链路心跳新增real和ftp状态

This commit is contained in:
谷成伟 2024-12-31 10:55:14 +08:00
parent e0e746c466
commit 1a415e549b

View File

@ -82,7 +82,7 @@ public class SysNodeServiceImpl implements SysNodeService {
SysIotModelServiceMapper iotModelServiceMapper; SysIotModelServiceMapper iotModelServiceMapper;
@Autowired @Autowired
RedisTemplate<String,Integer> redisTemplate; RedisTemplate<String,Object> redisTemplate;
@Override @Override
public List<SysNodeVo> querySysNodeList() { public List<SysNodeVo> querySysNodeList() {
@ -145,7 +145,7 @@ public class SysNodeServiceImpl implements SysNodeService {
*/ */
@Override @Override
public PageDataInfo<SysCommunicationLinkVo> querySysCommunicationLinkList(SysCommunicationLinkDto sysCommunicationLinkDto) { public PageDataInfo<SysCommunicationLinkVo> querySysCommunicationLinkList(SysCommunicationLinkDto sysCommunicationLinkDto) {
ValueOperations<String,Integer> ops = redisTemplate.opsForValue(); ValueOperations<String,Object> ops = redisTemplate.opsForValue();
// 初始化分页查询对象 // 初始化分页查询对象
PageQuery pageQuery = new PageQuery(); PageQuery pageQuery = new PageQuery();
pageQuery.setPageNum(sysCommunicationLinkDto.getPageNum()); pageQuery.setPageNum(sysCommunicationLinkDto.getPageNum());
@ -172,16 +172,16 @@ public class SysNodeServiceImpl implements SysNodeService {
} }
// 批量获取在线状态值 // 批量获取在线状态值
List<Integer> onlinesStatus = ops.multiGet(onlines); List<Object> onlinesStatus = ops.multiGet(onlines);
List<Integer> ftpsStatus = ops.multiGet(ftps); List<Object> ftpsStatus = ops.multiGet(ftps);
List<Integer> realsStatus = ops.multiGet(reals); List<Object> realsStatus = ops.multiGet(reals);
// 遍历在线状态值更新通信链路的在线状态 // 遍历在线状态值更新通信链路的在线状态
for (int i = 0; i < records.size(); i++) { for (int i = 0; i < records.size(); i++) {
SysCommunicationLinkVo sysCommunicationLinkVo = records.get(i); SysCommunicationLinkVo sysCommunicationLinkVo = records.get(i);
Integer ostatus = onlinesStatus.get(i); Integer ostatus = (Integer) onlinesStatus.get(i);
Integer fstatus = ftpsStatus.get(i); Integer fstatus = (Integer) ftpsStatus.get(i);
Integer rstatus = realsStatus.get(i); Integer rstatus = (Integer) realsStatus.get(i);
if (ostatus == null) { if (ostatus == null) {
ostatus = 0; ostatus = 0;
} }