Pu Zhibing
2025-04-11 d91bdbe8ebe5107509e04cf2ed2ec4ba3e0070da
DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
@@ -12,6 +12,8 @@
import com.stylefeng.guns.modular.system.model.OrderPosition;
import com.stylefeng.guns.modular.taxi.model.OrderTaxi;
import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService;
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;
@@ -36,6 +38,8 @@
 */
@Component
public class PushUtil {
    private Logger log = LoggerFactory.getLogger(PushUtil.class);
    @Autowired
    private RestTemplate internalRestTemplate;
@@ -99,7 +103,7 @@
        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
        JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
        if(jsonObject1.getIntValue("code") != 200){
            System.err.println(jsonObject1.getString("msg"));
            log.error(jsonObject1.getString("msg"));
        }
    }
@@ -133,7 +137,7 @@
        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
        JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
        if(jsonObject1.getIntValue("code") != 200){
            System.err.println(jsonObject1.getString("msg"));
            log.error(jsonObject1.getString("msg"));
        }
    }
@@ -280,7 +284,7 @@
        //计算预计距离和剩余时间
        String value = redisUtil.getValue("DRIVER" + String.valueOf(driverId));
        if(null == value || "".equals(value)){
            System.err.println("司机没有上传位置信息");
//            System.err.println("司机没有上传位置信息");
            return;
        }
@@ -362,7 +366,7 @@
        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
        JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
        if(jsonObject1.getIntValue("code") != 200){
            System.err.println(jsonObject1.getString("msg"));
            log.error(jsonObject1.getString("msg"));
        }
    }
@@ -432,7 +436,7 @@
        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
        JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
        if(jsonObject1.getIntValue("code") != 200){
            System.err.println(jsonObject1.getString("msg"));
            log.error(jsonObject1.getString("msg"));
        }
    }
@@ -469,7 +473,7 @@
        String s = internalRestTemplate.postForObject("http://zuul-gateway/netty/sendMsgToClient",requestEntity , String.class);
        JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class);
        if(jsonObject1.getIntValue("code") != 200){
            System.err.println(jsonObject1.getString("msg"));
            log.error(jsonObject1.getString("msg"));
        }
    }