From a1f5b4bcde020c206382c3a07c9b4ecd5784a9d8 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 13 八月 2025 15:26:55 +0800 Subject: [PATCH] 修改bug --- MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java b/MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java index 97bc8f0..a4bbdfb 100644 --- a/MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java +++ b/MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java @@ -5,6 +5,7 @@ import cn.hutool.http.HttpUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.sinata.push.config.QYTConfig; import com.sinata.push.util.*; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; @@ -33,18 +34,25 @@ public static Hashtable<String, Hashtable<ChannelHandlerContext, String>> map = new Hashtable<String, Hashtable<ChannelHandlerContext,String>>(); public static Hashtable<String,String> table; + + public static QYTConfig qytConfig; private RedisUtil redisUtil = SpringUtil.getObject(RedisUtil.class); private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); - + static{ if(table == null){ table = new Hashtable<>(); } + } + + + public static void setQytConfig(QYTConfig qytConfig) { + NettyServerController.qytConfig = qytConfig; } public static boolean isdebug = false; @@ -201,7 +209,7 @@ params.put("lat", String.valueOf(lat)); params.put("directionAngle", String.valueOf(computeAzimuth)); params.put("altitude", String.valueOf(altitude)); - HttpRequest post = HttpUtil.createPost(URLUtil.zuul + "/driver-server/base/savePosition"); + HttpRequest post = HttpUtil.createPost(qytConfig.getChuxingUrl() + "/driver-server/base/savePosition"); post.contentType(MediaType.APPLICATION_FORM_URLENCODED_VALUE); post.form(params); HttpResponse execute = post.execute(); @@ -228,7 +236,7 @@ params.put("lat", String.valueOf(lat)); params.put("directionAngle", String.valueOf(computeAzimuth)); params.put("altitude", String.valueOf(altitude)); - HttpRequest post = HttpUtil.createPost(URLUtil.aj_zuul + "/driver-server/base/driver/addDriverPosition"); + HttpRequest post = HttpUtil.createPost(qytConfig.getDaijiaurl() + "/driver-server/base/driver/addDriverPosition"); post.contentType(MediaType.APPLICATION_FORM_URLENCODED_VALUE); post.form(params); HttpResponse execute = post.execute(); -- Gitblit v1.7.1