服务器注册接口、snmp采集工具优化、其他bug修复

This commit is contained in:
gaoyutao
2025-10-17 18:56:32 +08:00
parent b3f16d2c8f
commit b0e63880fc
47 changed files with 1856 additions and 209 deletions
@@ -89,4 +89,13 @@ public interface RemoteRevenueConfigService
@PostMapping("/registration/getListByHardwareSn")
public R<RmResourceRegistrationRemote> getListByHardwareSn(@RequestBody RmResourceRegistrationRemote rmResourceRegistrationRemote, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 根据clientId获取交换机名称信息
* @param rmSwitchManagementRemote
* @param source
* @return
*/
@PostMapping("/switchManagement/getSwitchNameByClientId")
public R<List<RmSwitchManagementRemote>> getSwitchNameByClientId(@RequestBody RmSwitchManagementRemote rmSwitchManagementRemote, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
@@ -0,0 +1,74 @@
package com.ruoyi.system.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import lombok.Data;
import java.util.Date;
@Data
public class RmSwitchManagementRemote {
/** 主键ID */
private Long id;
/** 交换机名称 */
@Excel(name = "交换机名称")
private String switchName;
/** 硬件SN序列号 */
@Excel(name = "硬件SN序列号")
private String hardwareSn;
/** SNMP采集地址 */
@Excel(name = "SNMP采集地址")
private String snmpAddress;
/** SNMP采集端口 */
@Excel(name = "SNMP采集端口")
private Long snmpPort;
/** 在线状态(0-离线,1-在线) */
@Excel(name = "在线状态(0-离线,1-在线)")
private String onlineStatus;
/** 上机时间 */
private Date upTime;
/** 心跳监测次数 */
@Excel(name = "心跳监测次数")
private String heartbeatCount;
/** 心跳监测周期(秒) */
@Excel(name = "心跳监测周期(秒)")
private String heartbeatInterval;
/** 心跳检测OID */
@Excel(name = "心跳检测OID")
private String heartbeatOid;
/** SNMP版本(v1/v2c/v3) */
@Excel(name = "SNMP版本(v1/v2c/v3)")
private String snmpVersion;
/** 读写权限 */
@Excel(name = "读写权限")
private String readWritePermission;
/** 安全级别 */
@Excel(name = "安全级别")
private String securityLevel;
/** 加密方式 */
@Excel(name = "加密方式")
private String encryptionMethod;
/** 团体名称 */
@Excel(name = "团体名称")
private String communityName;
/** 密码 */
@Excel(name = "密码")
private String switchPassword;
/** 交换机类型 */
private String switchType;
/** 用户名 */
private String switchUser;
/** 自动生成客户端id(uuid) */
private String clientId;
}
@@ -66,6 +66,11 @@ public class RemoteRevenueConfigFallbackFactory implements FallbackFactory<Remot
public R<RmResourceRegistrationRemote> getListByHardwareSn(RmResourceRegistrationRemote rmResourceRegistrationRemote, String source) {
return R.fail("根据SN获取资源注册列表信息失败" + throwable.getMessage());
}
@Override
public R<List<RmSwitchManagementRemote>> getSwitchNameByClientId(RmSwitchManagementRemote rmSwitchManagementRemote, String source) {
return R.fail("根据clientId获取交换机信息失败" + throwable.getMessage());
}
};
}
}