优化交换机监控策略、交换机管理分页查询
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ public class RmSwitchManagementController extends BaseController
|
||||
*/
|
||||
@RequiresPermissions("system:switchManagement:list")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo list(RmSwitchManagement rmSwitchManagement)
|
||||
public TableDataInfo list(@RequestBody RmSwitchManagement rmSwitchManagement)
|
||||
{
|
||||
PageDomain pageDomain = new PageDomain();
|
||||
pageDomain.setPageNum(rmSwitchManagement.getPageNum());
|
||||
|
||||
+1
@@ -59,6 +59,7 @@
|
||||
and (snmp_address = #{snmpAddress} or switch_name like concat('%', #{switchName}, '%'))
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectRmSwitchManagementById" parameterType="Long" resultMap="RmSwitchManagementResult">
|
||||
|
||||
+3
@@ -273,6 +273,9 @@ public class RmMonitorPolicyServiceImpl implements IRmMonitorPolicyService
|
||||
public int addResourcePolicy(RmMonitorPolicy rmMonitorPolicy) {
|
||||
// 保存策略信息
|
||||
rmMonitorPolicy.setCreateBy(SecurityUtils.getUsername());
|
||||
rmMonitorPolicy.setCreateTime(DateUtils.getNowDate());
|
||||
rmMonitorPolicy.setStatus("0");
|
||||
rmMonitorPolicy.setUpdateTime(DateUtils.getNowDate());
|
||||
rmMonitorPolicyMapper.insertRmMonitorPolicy(rmMonitorPolicy);
|
||||
// 拿到采集周期
|
||||
List<RmMonitorPolicyVo> collectionAndIdList = rmMonitorPolicy.getCollectionAndIdList();
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ public class MultiSwitchCollectionScheduler {
|
||||
if (collectVo.isCollect()) {
|
||||
ScheduledFuture<?> task;
|
||||
// 剔除switchVo中的其他oid
|
||||
if (switchVo.getOtherOID() != null) {
|
||||
if (switchVo.getOtherOID() != null && !switchVo.getOtherOID().isEmpty()) {
|
||||
Map<String, String> otherOid = switchOidVo.getOtherOID();
|
||||
String type = collectVo.getType();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user