From db0aaa2033a43c016ca165513faaee993117ecf8 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 22 八月 2025 12:14:14 +0800 Subject: [PATCH] 修改bug --- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java index 0ac1b95..b2c74b0 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java @@ -9,6 +9,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; @@ -26,9 +27,9 @@ @Component public class PushUtil { - Logger logger = LoggerFactory.getLogger("ServiceLog"); - - private final String socket_uri = "http://192.168.110.85:6000"; + + @Value("${qyt.socket_uri}") + private String socket_uri; @@ -52,6 +53,7 @@ params.put("msg", msg.toJSONString()); params.put("id", id.toString()); params.put("type", type.toString()); + params.put("bussinessType", "daijia"); post.form(params); HttpResponse execute = post.execute(); if (200 != execute.getStatus()) { @@ -59,7 +61,6 @@ }else{ JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class); if(jsonObject1.getIntValue("code") != 200){ - logger.debug(jsonObject1.getString("msg")); System.err.println(jsonObject1.getString("msg")); } } @@ -86,6 +87,7 @@ params.put("msg", msg.toJSONString()); params.put("id", id.toString()); params.put("type", type.toString()); + params.put("bussinessType", "daijia"); post.form(params); HttpResponse execute = post.execute(); if (200 != execute.getStatus()) { @@ -93,7 +95,6 @@ }else{ JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class); if(jsonObject1.getIntValue("code") != 200){ - logger.debug(jsonObject1.getString("msg")); System.err.println(jsonObject1.getString("msg")); } } @@ -127,6 +128,7 @@ params.put("msg", msg.toJSONString()); params.put("id", id.toString()); params.put("type", type.toString()); + params.put("bussinessType", "daijia"); post.form(params); HttpResponse execute = post.execute(); if (200 != execute.getStatus()) { @@ -134,7 +136,6 @@ }else{ JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class); if(jsonObject1.getIntValue("code") != 200){ - logger.debug(jsonObject1.getString("msg")); System.err.println(jsonObject1.getString("msg")); } } @@ -163,6 +164,7 @@ params.put("msg", msg.toJSONString()); params.put("id", id.toString()); params.put("type", type.toString()); + params.put("bussinessType", "daijia"); post.form(params); HttpResponse execute = post.execute(); if (200 != execute.getStatus()) { @@ -170,7 +172,6 @@ }else{ JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class); if(jsonObject1.getIntValue("code") != 200){ - logger.debug(jsonObject1.getString("msg")); System.err.println(jsonObject1.getString("msg")); } } @@ -206,6 +207,7 @@ params.put("msg", msg.toJSONString()); params.put("id", id.toString()); params.put("type", type.toString()); + params.put("bussinessType", "daijia"); post.form(params); HttpResponse execute = post.execute(); if (200 != execute.getStatus()) { @@ -213,7 +215,6 @@ }else{ JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class); if(jsonObject1.getIntValue("code") != 200){ - logger.debug(jsonObject1.getString("msg")); System.err.println(jsonObject1.getString("msg")); } } @@ -248,6 +249,7 @@ params.put("msg", msg.toJSONString()); params.put("id", id.toString()); params.put("type", type.toString()); + params.put("bussinessType", "daijia"); post.form(params); HttpResponse execute = post.execute(); if (200 != execute.getStatus()) { @@ -255,7 +257,6 @@ }else{ JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class); if(jsonObject1.getIntValue("code") != 200){ - logger.debug(jsonObject1.getString("msg")); System.err.println(jsonObject1.getString("msg")); } } @@ -286,6 +287,7 @@ params.put("msg", msg.toJSONString()); params.put("id", id.toString()); params.put("type", type.toString()); + params.put("bussinessType", "daijia"); post.form(params); HttpResponse execute = post.execute(); if (200 != execute.getStatus()) { @@ -293,7 +295,6 @@ }else{ JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class); if(jsonObject1.getIntValue("code") != 200){ - logger.debug(jsonObject1.getString("msg")); System.err.println(jsonObject1.getString("msg")); } } @@ -327,6 +328,7 @@ params.put("msg", msg.toJSONString()); params.put("id", id.toString()); params.put("type", type.toString()); + params.put("bussinessType", "daijia"); post.form(params); HttpResponse execute = post.execute(); if (200 != execute.getStatus()) { @@ -334,7 +336,6 @@ }else{ JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class); if(jsonObject1.getIntValue("code") != 200){ - logger.debug(jsonObject1.getString("msg")); System.err.println(jsonObject1.getString("msg")); } } @@ -366,6 +367,7 @@ params.put("msg", msg.toJSONString()); params.put("id", id.toString()); params.put("type", type.toString()); + params.put("bussinessType", "daijia"); post.form(params); HttpResponse execute = post.execute(); if (200 != execute.getStatus()) { @@ -373,7 +375,6 @@ }else{ JSONObject jsonObject1 = JSON.parseObject(execute.body(), JSONObject.class); if(jsonObject1.getIntValue("code") != 200){ - logger.debug(jsonObject1.getString("msg")); System.err.println(jsonObject1.getString("msg")); } } -- Gitblit v1.7.1