From c5d77a67a20575dc9754dec40947ad652376f0cc Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期三, 29 四月 2026 10:49:53 +0800
Subject: [PATCH] fix:提交

---
 src/main/java/com/wgcloud/controller/dp/DpController.java |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/wgcloud/controller/dp/DpController.java b/src/main/java/com/wgcloud/controller/dp/DpController.java
index a053c5f..e52c207 100644
--- a/src/main/java/com/wgcloud/controller/dp/DpController.java
+++ b/src/main/java/com/wgcloud/controller/dp/DpController.java
@@ -2,9 +2,11 @@
 
 import com.wgcloud.entity.OspfErrorLog;
 import com.wgcloud.entity.OspfInfo;
+import com.wgcloud.entity.OspfMonitor;
 import com.wgcloud.entity.SnmpInfo;
 import com.wgcloud.service.OspfErrorLogService;
 import com.wgcloud.service.OspfInfoService;
+import com.wgcloud.service.OspfMonitorService;
 import com.wgcloud.service.SnmpInfoService;
 import com.wgcloud.util.R;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,6 +33,8 @@
     @Autowired
     private OspfInfoService ospfInfoService;
     @Autowired
+    private OspfMonitorService ospfMonitorService;
+    @Autowired
     private OspfErrorLogService ospfErrorLogService;
 
     @GetMapping("/getTop")
@@ -55,14 +59,12 @@
     @GetMapping("/getWb")
     public R getWb() throws Exception {
         List<Map<String,Object>> list = new ArrayList<>();
-        List<OspfInfo> ospfInfos = ospfInfoService.selectAllByParams(null);
-
-        for (OspfInfo ospfInfo : ospfInfos) {
+        List<OspfMonitor> ospfMonitors = ospfMonitorService.selectAllByParams(null);
+        for (OspfMonitor ospfInfo : ospfMonitors) {
             HashMap<String, Object> map = new HashMap<>();
             map.put("name",ospfInfo.getInfoContent());
             map.put("ipaddress",ospfInfo.getHostname());
-            map.put("type",1);
-            map.put("status",1);
+            map.put("remoteType",ospfInfo.getRemoteType());
             list.add(map);
         }
         return R.ok(list);
@@ -116,8 +118,8 @@
         List<Map<String,Object>> list = new ArrayList<>();
         List<OspfInfo> ospfInfos = ospfInfoService.selectAllByParams(null);
         HashMap<String, Object> hxMap = new HashMap<>();
-        hxMap.put("ipAddress","\n鐢典俊锛�192.168.1.1\n 鑱旈�氾細192.168.2.1\n 绉诲姩锛�192.168.3.1");
-        hxMap.put("name","鍖楀浗鏍稿績");
+        hxMap.put("ipAddress","涓荤洃娴嬭澶嘔P");
+        hxMap.put("name","涓荤洃娴嬭澶�");
         hxMap.put("status","0");
         list.add(hxMap);
         for (OspfInfo ospfInfo : ospfInfos) {

--
Gitblit v1.9.1