From 285b20e698b0f26bdb3e9182d367ecae2c5a63d0 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期三, 03 十二月 2025 10:12:34 +0800
Subject: [PATCH] 推送修改

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

diff --git a/src/main/java/com/wgcloud/controller/dp/DpController.java b/src/main/java/com/wgcloud/controller/dp/DpController.java
index 53d4ba2..a053c5f 100644
--- a/src/main/java/com/wgcloud/controller/dp/DpController.java
+++ b/src/main/java/com/wgcloud/controller/dp/DpController.java
@@ -9,6 +9,7 @@
 import com.wgcloud.util.R;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -84,6 +85,7 @@
             HashMap<String, Object> map = new HashMap<>();
             map.put("date",sdf.format(ospfInfo.getCreateTime()));
             map.put("name",ospfInfo.getInfoContent());
+            map.put("id",ospfInfo.getId());
             map.put("ipaddress",ospfInfo.getHostname());
             map.put("status",ospfInfo.getState());
             list.add(map);
@@ -113,6 +115,11 @@
     public R getInfo() throws Exception {
         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("status","0");
+        list.add(hxMap);
         for (OspfInfo ospfInfo : ospfInfos) {
             HashMap<String, Object> map = new HashMap<>();
             map.put("ipAddress",ospfInfo.getHostname());
@@ -123,5 +130,17 @@
         return R.ok(list);
     }
 
+    @GetMapping("/handle")
+    public R handle(String id) throws Exception {
+        OspfErrorLog ospfErrorLog = ospfErrorLogService.selectById(id);
+        if(ospfErrorLog.getState().equals("1")){
+            ospfErrorLog.setState("0");
+            ospfErrorLogService.updateById(ospfErrorLog);
+            return R.ok();
+        }else {
+            return R.ok();
+        }
+    }
+
 
 }

--
Gitblit v1.9.1