From f360ef0dc48bcde2446999df67a181e545ff808d Mon Sep 17 00:00:00 2001
From: yanghb <yanghb>
Date: 星期二, 04 四月 2023 14:09:32 +0800
Subject: [PATCH] 名称调整

---
 UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java      |   11 ++++++-----
 DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java   |    9 +++++----
 DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java    |   13 +++++++------
 DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java  |    9 +++++----
 DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java |    9 +++++----
 UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java     |    9 +++++----
 6 files changed, 33 insertions(+), 27 deletions(-)

diff --git a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
index 1f693a5..3ce94d6 100644
--- a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
+++ b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
@@ -43,6 +43,7 @@
 
     private Map<String, Timer> taskMap = new HashMap<>();//存储定时推送的定时器
 
+    private final String host = "http://127.0.0.1:5000/";
 
 
 
@@ -76,7 +77,7 @@
         params.add("id", String.valueOf(uid));
         params.add("type", String.valueOf(type));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -111,7 +112,7 @@
         params.add("id", String.valueOf(uid));
         params.add("type", String.valueOf(type));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host+"/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -263,7 +264,7 @@
         params.add("id", jsonObject.getString("id"));
         params.add("type", jsonObject.getString("type"));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host+ "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -293,7 +294,7 @@
         params.add("id", id.toString());
         params.add("type", type.toString());
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host+"/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
diff --git a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
index 533a93d..89e91be 100644
--- a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
+++ b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
@@ -22,6 +22,7 @@
     @Autowired
     private RestTemplate internalRestTemplate;
 
+    private final String host = "http://127.0.0.1:5000/";
 
     /**
      * 向redis中存储字符串没有过期时间
@@ -39,7 +40,7 @@
             params.add("key", key);
             params.add("value", value);
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/setValue_", requestEntity, String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/setValue_", requestEntity, String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
@@ -67,7 +68,7 @@
             params.add("value", value);
             params.add("time", String.valueOf(time));
             HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/setValue", requestEntity, String.class);
+            String s = internalRestTemplate.postForObject(host+"/redis/setValue", requestEntity, String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
@@ -90,7 +91,7 @@
             MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
             params.add("key", key);
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/getValue",requestEntity , String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/getValue",requestEntity , String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
@@ -114,7 +115,7 @@
             MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
             params.add("key", key);
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/remove",requestEntity , String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/remove",requestEntity , String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
diff --git a/DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java b/DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
index 1143851..d8346eb 100644
--- a/DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
+++ b/DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
@@ -53,6 +53,7 @@
 
     private Map<String, Timer> taskMap = new HashMap<>();//存储定时推送的定时器
 
+    private final String host = "http://127.0.0.1:5000/";
 
 
     /**
@@ -84,7 +85,7 @@
         params.add("id", String.valueOf(uid));
         params.add("type", String.valueOf(type));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -118,7 +119,7 @@
         params.add("id", String.valueOf(uid));
         params.add("type", type.toString());
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -339,7 +340,7 @@
         params.add("id", jsonObject.getString("id"));
         params.add("type", jsonObject.getString("type"));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -370,7 +371,7 @@
         params.add("id", id.toString());
         params.add("type", type.toString());
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -409,7 +410,7 @@
         params.add("id", String.valueOf(uid));
         params.add("type", String.valueOf(type));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -446,7 +447,7 @@
         params.add("id", String.valueOf(uid));
         params.add("type", String.valueOf(type));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
diff --git a/DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java b/DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
index b186f83..8c73b9c 100644
--- a/DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
+++ b/DriverTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
@@ -22,6 +22,7 @@
     @Autowired
     private RestTemplate internalRestTemplate;
 
+    private final String host = "http://127.0.0.1:5000/";
 
     /**
      * 向redis中存储字符串没有过期时间
@@ -39,7 +40,7 @@
             params.add("key", key);
             params.add("value", value);
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/setValue_", requestEntity, String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/setValue_", requestEntity, String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
@@ -67,7 +68,7 @@
             params.add("value", value);
             params.add("time", String.valueOf(time));
             HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/setValue", requestEntity, String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/setValue", requestEntity, String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
@@ -90,7 +91,7 @@
             MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
             params.add("key", key);
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/getValue",requestEntity , String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/getValue",requestEntity , String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
@@ -115,7 +116,7 @@
             MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
             params.add("key", key);
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/remove",requestEntity , String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/remove",requestEntity , String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
diff --git a/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java b/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
index 4b493f2..1f1a69a 100644
--- a/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
+++ b/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
@@ -48,6 +48,7 @@
 
     private Map<String, Timer> taskMap = new HashMap<>();//存储定时推送的定时器
 
+    private final String host = "http://127.0.0.1:5000/";
 
 
 
@@ -86,7 +87,7 @@
         params.add("id", String.valueOf(uid));
         params.add("type", String.valueOf(type));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -121,7 +122,7 @@
         params.add("id", String.valueOf(uid));
         params.add("type", String.valueOf(type));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -290,7 +291,7 @@
         params.add("id", jsonObject.getString("id"));
         params.add("type", jsonObject.getString("type"));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -320,7 +321,7 @@
         params.add("id", id.toString());
         params.add("type", type.toString());
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
@@ -357,7 +358,7 @@
         params.add("id", String.valueOf(uid));
         params.add("type", String.valueOf(type));
         HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
+        String s = internalRestTemplate.postForObject(host + "/netty/sendMsgToClient",requestEntity , String.class);
         JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
         if(jsonObject1.getIntValue("code") != 200){
             System.err.println(jsonObject1.getString("msg"));
diff --git a/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java b/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
index 22f75e6..0b9f589 100644
--- a/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
+++ b/UserTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
@@ -24,6 +24,7 @@
     @Autowired
     private RestTemplate internalRestTemplate;
 
+    private final String host = "http://127.0.0.1:5000/";
 
     /**
      * 向redis中存储字符串没有过期时间
@@ -41,7 +42,7 @@
             params.add("key", key);
             params.add("value", value);
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/setValue_", requestEntity, String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/setValue_", requestEntity, String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
@@ -69,7 +70,7 @@
             params.add("value", value);
             params.add("time", String.valueOf(time));
             HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/setValue", requestEntity, String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/setValue", requestEntity, String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
@@ -92,7 +93,7 @@
             MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
             params.add("key", key);
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/getValue",requestEntity , String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/getValue",requestEntity , String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");
@@ -116,7 +117,7 @@
             MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
             params.add("key", key);
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
-            String s = internalRestTemplate.postForObject("http://zuul-gateway/redis/remove",requestEntity , String.class);
+            String s = internalRestTemplate.postForObject(host + "/redis/remove",requestEntity , String.class);
             JSONObject jsonObject = JSON.parseObject(s, JSONObject.class);
             if(jsonObject.getIntValue("code") != 200){
                 System.err.println("调用redis出错了");

--
Gitblit v1.7.1