Authored by gemingdan

广点通行为上报版本升级1.1

... ... @@ -48,7 +48,7 @@ public class HttpUtils {
Map<String, Object> param=JsonUtil.jsonToObject(jsonstr,Map.class);
Pair<Integer, String> pair2 = null;
try {
String url = "https://www.duomai.com/api/push/myohobuy.php?";
String url = "https://www.duomai.com/api/push/myohobuy.php";
pair2 = HttpUtils.httpGet(url, param);
} catch (Exception e) {
// logger.error("common order post fail,orderCode is {},errorMessage is {}", orderInfo.getParentOrderCode(),e.getMessage());
... ... @@ -200,13 +200,15 @@ public class HttpUtils {
int code = 0;
String message = "";
try {
StringBuilder paramstr = new StringBuilder();
StringBuilder paramstr = new StringBuilder("?");
for (String key : param.keySet()) {
if (param.get(key) != null) {
paramstr.append(key.trim()+"=" +URLEncoder.encode(param.get(key).toString(), "UTF-8")+"&");
}
}
get = new HttpGet(url+ paramstr.substring(0,paramstr.length()-1));
url+=paramstr.substring(0,paramstr.length()-1);
log.info("call url :{}",url);
get = new HttpGet(url);
re = client.execute(get);
code = re.getStatusLine().getStatusCode();
message = EntityUtils.toString(re.getEntity(), "UTF-8");
... ...
... ... @@ -92,7 +92,7 @@ public class GDT2019ServiceImpl extends UnionServiceImpl implements IUnionServic
public String getCallbackUrl() {
long now = DateUtil.getCurrentTimeSeconds();
String nonce= MD5.md5(Long.toString(System.currentTimeMillis()));
StringBuilder url = new StringBuilder("https://api.e.qq.com/v1.0/user_actions/add?timestamp="+ now+"&nonce="+nonce);
StringBuilder url = new StringBuilder("https://api.e.qq.com/v1.1/user_actions/add?timestamp="+ now+"&nonce="+nonce);
return url.toString();
}
... ...