| @@ -30,6 +30,8 @@ import java.util.Base64; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| import java.util.SortedMap; | |||||
| import java.util.TreeMap; | |||||
| import java.util.regex.Matcher; | import java.util.regex.Matcher; | ||||
| import java.util.regex.Pattern; | import java.util.regex.Pattern; | ||||
| @@ -67,7 +69,10 @@ public class BoLinkUtil { | |||||
| String carNumber = "京88888"; | String carNumber = "京88888"; | ||||
| //String result = getStopFee(URL, COMID, UNION_ID, KEY, carNumber); | //String result = getStopFee(URL, COMID, UNION_ID, KEY, carNumber); | ||||
| System.out.println(addTimeByStr(new Date(),"1天3小时1分钟")); | |||||
| //System.out.println(addTimeByStr(new Date(),"1天3小时1分钟")); | |||||
| String data = "{\"comid\":\"kytest2020032501\",\"union_id\":\"200279\",\"car_number\":\"晋QQ1234\",\"lock_status\":1}"; | |||||
| System.out.println(getSign("MAVXUU3C2545G9K1",data)); | |||||
| } | } | ||||
| public static Date addTimeByStr(Date time, String str) { | public static Date addTimeByStr(Date time, String str) { | ||||
| @@ -135,7 +140,7 @@ public class BoLinkUtil { | |||||
| public static String getStopFee(String baseUrl, String comid, String unionId, String key, String carNumber) { | public static String getStopFee(String baseUrl, String comid, String unionId, String key, String carNumber) { | ||||
| String stopFeeUrl = "/zld/queryorderprice"; | String stopFeeUrl = "/zld/queryorderprice"; | ||||
| String url = baseUrl + stopFeeUrl; | String url = baseUrl + stopFeeUrl; | ||||
| Map<String, Object> params = new HashMap<>(); | |||||
| SortedMap<String, Object> params = new TreeMap<String, Object>(); | |||||
| params.put(BOLINK_COMID, comid); | params.put(BOLINK_COMID, comid); | ||||
| params.put(BOLINK_UNION_ID, unionId); | params.put(BOLINK_UNION_ID, unionId); | ||||
| params.put(BOLINK_CAR_NUMBER, carNumber); | params.put(BOLINK_CAR_NUMBER, carNumber); | ||||
| @@ -159,7 +164,7 @@ public class BoLinkUtil { | |||||
| String unit, String amount) { | String unit, String amount) { | ||||
| String couponUrl = "/zld/openservice/paynoticetopark"; | String couponUrl = "/zld/openservice/paynoticetopark"; | ||||
| String url = baseUrl + couponUrl; | String url = baseUrl + couponUrl; | ||||
| Map<String, Object> params = new HashMap<>(); | |||||
| SortedMap<String, Object> params = new TreeMap<String, Object>(); | |||||
| params.put(BOLINK_COMID, comid); | params.put(BOLINK_COMID, comid); | ||||
| params.put(BOLINK_UNION_ID, unionId); | params.put(BOLINK_UNION_ID, unionId); | ||||
| params.put(BOLINK_CAR_NUMBER, carNumber); | params.put(BOLINK_CAR_NUMBER, carNumber); | ||||