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