服务器注册图形监控监控项接口开发

This commit is contained in:
gaoyutao
2025-10-15 18:22:16 +08:00
parent 87824abb77
commit 3019f65515
10 changed files with 404 additions and 90 deletions
@@ -92,7 +92,11 @@ public class ScreenController extends BaseController
public AjaxResult countDeviceNumTop5()
{
List<Map> maps = epsServerRevenueConfigService.countDeviceNumTop5();
return success(maps);
if(maps.isEmpty()){
return success();
}else{
return success(maps);
}
}
/**
@@ -104,6 +104,7 @@
// String.class
// );
//
// System.out.println("secretKey" + secretKey);
// System.out.println("API响应结果:" + response.getBody());
// System.out.println("定时任务执行完成");
//
@@ -256,7 +256,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<!-- 查询所有资源名称-->
<select id="selectAllResourceNameByType" parameterType="RmResourceRegistration" resultType="java.util.Map">
select resource_name resourceName,ip_address ipAddress,hardware_sn hardwareSn from rm_resource_registration
SELECT
resource_name AS resourceName,
CASE
WHEN resource_type = '1' THEN ip_address
WHEN resource_type = '2' THEN snmp_collect_addr
END AS ipAddress,
hardware_sn AS hardwareSn
FROM rm_resource_registration
<where>
and registration_status = 1
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>