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