优化服务器管理搜索、监控看板优化
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ public class RmResourceRegistrationController extends BaseController
|
||||
public TableDataInfo list(@RequestBody RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
Map<String, Object> resultMap = rmResourceRegistrationService.getRegistrationTableInfoList(rmResourceRegistration);
|
||||
if(rmResourceRegistration.getQueryParam() != null){
|
||||
if(rmResourceRegistration.getQueryParam() != null && rmResourceRegistration.getQueryParam() != ""){
|
||||
return getDataTable((List<RmResourceRegistration>) resultMap.get("list"), (int) resultMap.get("total"));
|
||||
}
|
||||
return getDataTable((List<RmResourceRegistration>) resultMap.get("list"));
|
||||
|
||||
+2
@@ -142,7 +142,9 @@ public class RmMonitorConfigDetailsServiceImpl implements IRmMonitorConfigDetail
|
||||
if(rmMonitorConfig != null){
|
||||
// 拿到开始时间
|
||||
String startTime = rmMonitorConfig.getMonitorStartTime();
|
||||
if(queryParam.getStartTime() == null){
|
||||
queryParam.setStartTime(startTime);
|
||||
}
|
||||
if(queryParam.getEndTime() == null){
|
||||
queryParam.setEndTime(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
|
||||
}
|
||||
|
||||
+2
-2
@@ -82,7 +82,7 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
public Map<String, Object> getRegistrationTableInfoList(RmResourceRegistration rmResourceRegistration)
|
||||
{
|
||||
Map<String, Object> resultMap = new HashMap();
|
||||
if(rmResourceRegistration.getQueryParam() == null){
|
||||
if(rmResourceRegistration.getQueryParam() == null || rmResourceRegistration.getQueryParam() == ""){
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmResourceRegistration.getPageNum());
|
||||
pageDomain.setPageSize(rmResourceRegistration.getPageSize());
|
||||
@@ -95,7 +95,7 @@ public class RmResourceRegistrationServiceImpl implements IRmResourceRegistratio
|
||||
setNetWorkMsg(resourceRegistration);
|
||||
}
|
||||
}
|
||||
if(rmResourceRegistration.getQueryParam() != null){
|
||||
if(rmResourceRegistration.getQueryParam() != null && rmResourceRegistration.getQueryParam() != ""){
|
||||
String queryValue = rmResourceRegistration.getQueryParam().trim();
|
||||
// 筛选公网IP私网IP设备SN相等的数据
|
||||
// 从rmResourceRegistrationList列表中筛选符合条件的数据
|
||||
|
||||
+1
-1
@@ -287,7 +287,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="endTime != null">
|
||||
and create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="clientIds != '' and clientIds != null">
|
||||
<if test="clientIds != null">
|
||||
and client_id in
|
||||
<foreach collection="clientIds.split(',')" item="clientId" open="(" separator="," close=")">
|
||||
#{clientId}
|
||||
|
||||
+1
-1
@@ -370,7 +370,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
ORDER BY max_speed desc
|
||||
</select>
|
||||
<select id="geSwitchListByMonitorView" parameterType="InitialSwitchInfoDetails" resultType="InitialSwitchInfoDetails">
|
||||
select client_id clientId, name, in_speed inSpeed, out_speed outSpeed, create_time createTime from initial_switch_info_details
|
||||
select switch_name switchName,client_id clientId, name, in_speed inSpeed, out_speed outSpeed, create_time createTime from initial_switch_info_details
|
||||
<where>
|
||||
<if test="startTime != null">
|
||||
and create_time >= #{startTime}
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
<if test="switchPassword != null and switchPassword != ''"> and switch_password = #{switchPassword}</if>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="queryName != null and queryName != ''">
|
||||
and (snmp_address = #{snmpAddress} or switch_name like concat('%', #{switchName}, '%'))
|
||||
and (snmp_address = #{queryName} or switch_name like concat('%', #{queryName}, '%'))
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
|
||||
Reference in New Issue
Block a user