Browse Source

起步、停靠

ZhangNing 9 months ago
parent
commit
50c617a1fa

+ 6 - 2
src/main/java/com/xyhy/xingshenmqttcluster/common/message/MessageHandle.java

@@ -3,9 +3,13 @@ package com.xyhy.xingshenmqttcluster.common.message;
 import com.alibaba.fastjson.JSONObject;
 import com.xyhy.xingshenmqttcluster.common.Common;
 import com.xyhy.xingshenmqttcluster.common.HttpRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class MessageHandle {
 
+    public static final Logger log =  LoggerFactory.getLogger(MessageHandle.class);
+
     public static void vehicleOnline(String s, JSONObject msg){
 
     }
@@ -27,7 +31,7 @@ public class MessageHandle {
         String url = Common.getConfigByName("charging.interface.api.url.test") + "/tcpcarControl";
         String param = "ivCapacityResourceld" + "=" + capacityResourceObjectId + "&" + "messageType" + "=" + "2";
         Object o = HttpRequest.sendPost(url, param);
-        System.out.println("=============\n" + o);
+        log.info(o.toString());
     }
 
     public static void arriveStationRequest(String s, JSONObject msg){
@@ -40,7 +44,7 @@ public class MessageHandle {
                        "ivParkPointId" + "=" + stationId + "&" +
                        "messageType" + "=" + "1";
         Object o = HttpRequest.sendPost(url, param);
-        System.out.println("=============\n" + o);
+        log.info(o.toString());
     }
 
     public static void arrivePoint(String s, JSONObject msg){