|
|
@@ -42,7 +42,9 @@ public class ItMonitorServiceImpl implements ItMonitorService {
|
|
|
|
|
|
@Override
|
|
|
public List<ItMonitorAgentKey> getAllAgentKey() {
|
|
|
- return itMonitorAgentKeyMapper.selectList(null);
|
|
|
+ QueryWrapper<ItMonitorAgentKey> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.orderByDesc("agent_key_id");
|
|
|
+ return itMonitorAgentKeyMapper.selectList(queryWrapper);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -55,7 +57,7 @@ public class ItMonitorServiceImpl implements ItMonitorService {
|
|
|
|
|
|
@Override
|
|
|
public int delAgentKey(Long agentKeyId) {
|
|
|
- return itMonitorAgentKeyMapper.deleteById(agentKeyId);
|
|
|
+ return itMonitorAgentKeyMapper.deleteAgentKeyById(agentKeyId);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -73,6 +75,7 @@ public class ItMonitorServiceImpl implements ItMonitorService {
|
|
|
if (itMonitorAgent.getAgentIP() != null && !itMonitorAgent.getAgentIP().isEmpty()) {
|
|
|
queryWrapper.likeRight("agent_ip", itMonitorAgent.getAgentIP());
|
|
|
}
|
|
|
+ queryWrapper.orderByDesc("agent_id");
|
|
|
return itMonitorAgentMapper.selectPage(page, queryWrapper);
|
|
|
}
|
|
|
|