From 1c40baaf9ca0183945b9881d11ceed5aeebc8290 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期四, 23 十月 2025 11:35:44 +0800
Subject: [PATCH] 修改bug
---
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
index 372be92..311733b 100644
--- a/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
+++ b/UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
@@ -13,6 +13,7 @@
import com.stylefeng.guns.modular.taxi.model.OrderTaxi;
import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
@@ -29,7 +30,9 @@
@Component
public class PushUtil {
- private final String socket_uri = "http://172.21.35.142:6000";
+ @Value("${qyt.socket_uri}")
+ private String socket_uri;
+
@Autowired
private IOrderTaxiService orderTaxiService;
@@ -81,6 +84,7 @@
params.put("msg", jsonObject.toJSONString());
params.put("id", uid);
params.put("type", type);
+ params.put("bussinessType", "dache");
post.form(params);
HttpResponse execute = post.execute();
if (200 != execute.getStatus()) {
@@ -101,7 +105,7 @@
* @param orderId
* @param orderType
*/
- public void pushEndPush(Integer type, Integer uid, Integer orderId, Integer orderType) {
+ public void pushEndPush(Integer type, Integer uid, Integer orderId, Integer orderType, Integer state) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("code", 200);
jsonObject.put("msg", "SUCCESS");
@@ -109,6 +113,7 @@
Map<String, Object> map = new HashMap<>();
map.put("orderId", orderId);
map.put("orderType", orderType);
+ map.put("state", state);
jsonObject.put("data", map);
//调用推送
@@ -119,6 +124,7 @@
params.put("msg", jsonObject.toJSONString());
params.put("id", uid);
params.put("type", type);
+ params.put("bussinessType", "dache");
post.form(params);
HttpResponse execute = post.execute();
if (200 != execute.getStatus()) {
@@ -243,7 +249,7 @@
}
//计算预计距离和剩余时间
- String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(driverId));
+ String value = (String) redisTemplate.opsForValue().get("dache:DRIVER" + String.valueOf(driverId));
if (null == value || "".equals(value)) {
return;
}
@@ -312,6 +318,7 @@
params.put("msg", msg.toJSONString());
params.put("id", jsonObject.getIntValue("id"));
params.put("type", jsonObject.getIntValue("type"));
+ params.put("bussinessType", "dache");
post.form(params);
HttpResponse execute = post.execute();
if (200 != execute.getStatus()) {
@@ -361,6 +368,7 @@
params.put("msg", msg.toJSONString());
params.put("id", id);
params.put("type", type);
+ params.put("bussinessType", "dache");
post.form(params);
HttpResponse execute = post.execute();
if (200 != execute.getStatus()) {
@@ -401,6 +409,7 @@
params.put("msg", jsonObject.toJSONString());
params.put("id", uid);
params.put("type", type);
+ params.put("bussinessType", "dache");
post.form(params);
HttpResponse execute = post.execute();
if (200 != execute.getStatus()) {
--
Gitblit v1.7.1