yumeng 8 months ago
parent
commit
a16a5f65e5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/main/java/cn/com/ctop/track/utils/HttpUtils.java

+ 3 - 2
src/main/java/cn/com/ctop/track/utils/HttpUtils.java

@@ -505,7 +505,7 @@ public class HttpUtils {
         if (null != treeMap && !treeMap.isEmpty()) {
         if (null != treeMap && !treeMap.isEmpty()) {
             for (Map.Entry<String, Object> entry : treeMap.entrySet()) {
             for (Map.Entry<String, Object> entry : treeMap.entrySet()) {
                 String key = entry.getKey();
                 String key = entry.getKey();
-                String value = URLEncoder.encode((String) entry.getValue().toString(),"UTF-8");
+                String value = URLEncoder.encode((String) entry.getValue().toString(), "UTF-8");
                 result += (key + "=" + value + seperator);
                 result += (key + "=" + value + seperator);
             }
             }
             if (result.length() > 0) {
             if (result.length() > 0) {
@@ -548,7 +548,7 @@ public class HttpUtils {
         HttpClient httpClient = createSslClientDefault();
         HttpClient httpClient = createSslClientDefault();
         String strReturn = "";
         String strReturn = "";
         try {
         try {
-            String uri = url + "&event_type=" + event_type;
+            String uri = url + "&event_type=" + event_type + "&event_time=" + new Date().getTime();
             HttpGet httpGet = new HttpGet(uri);
             HttpGet httpGet = new HttpGet(uri);
             if (headers != null) {
             if (headers != null) {
                 Iterator<String> keyIter = headers.keySet().iterator();
                 Iterator<String> keyIter = headers.keySet().iterator();
@@ -571,6 +571,7 @@ public class HttpUtils {
     }
     }
 
 
 
 
+
     public static String httpGet(String url, Map<String, Object> paramsMap, Map<String, String> headers) {
     public static String httpGet(String url, Map<String, Object> paramsMap, Map<String, String> headers) {
         String result = null;
         String result = null;
         try {
         try {