|
|
@ -294,6 +294,7 @@ public class ElephantUtils { |
|
|
|
Map<String, String> header = new HashMap<>(); |
|
|
|
Map<String, String> header = new HashMap<>(); |
|
|
|
header.put("Content-Type", "application/json"); |
|
|
|
header.put("Content-Type", "application/json"); |
|
|
|
String info = HttpUtils.sendJsonPost(url, jsonObject, header); |
|
|
|
String info = HttpUtils.sendJsonPost(url, jsonObject, header); |
|
|
|
|
|
|
|
log.info("【销项】【大象接口】调用京东云,调用地址:{},入参:{},头信息:{},返回结果:{}",url,jsonObject,header,info); |
|
|
|
JSONObject obj = JSONObject.parseObject(info); |
|
|
|
JSONObject obj = JSONObject.parseObject(info); |
|
|
|
redisCache.setCacheObject(ElephantConstants.TOKEN_REDIS_KEY + "appkey:" + appkey, obj, (int) obj.get("expires_in") - 60, TimeUnit.SECONDS); |
|
|
|
redisCache.setCacheObject(ElephantConstants.TOKEN_REDIS_KEY + "appkey:" + appkey, obj, (int) obj.get("expires_in") - 60, TimeUnit.SECONDS); |
|
|
|
return (String) obj.get("access_token"); |
|
|
|
return (String) obj.get("access_token"); |
|
|
@ -442,10 +443,17 @@ public class ElephantUtils { |
|
|
|
String sercretKey = sercretKeyProp.getValue(); |
|
|
|
String sercretKey = sercretKeyProp.getValue(); |
|
|
|
boolean isDevMode = CommonUtils.isDevMode(); |
|
|
|
boolean isDevMode = CommonUtils.isDevMode(); |
|
|
|
|
|
|
|
|
|
|
|
String host = ElephantConstants.PROD_HOST_LOCAL; |
|
|
|
// String host = ElephantConstants.PROD_HOST_LOCAL;
|
|
|
|
|
|
|
|
// if (isDevMode) {
|
|
|
|
|
|
|
|
// host = ElephantConstants.DEV_HOST_LOCAL;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO : 2023/11/09 大象接口迁京东云
|
|
|
|
|
|
|
|
String host = ElephantConstants.PROD_HOST_LOCAL_V6_JingDongYun; |
|
|
|
if (isDevMode) { |
|
|
|
if (isDevMode) { |
|
|
|
host = ElephantConstants.DEV_HOST_LOCAL; |
|
|
|
host = ElephantConstants.DEV_HOST_LOCAL_V6_JingDongYun; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//kk TODO : 2023/9/5 大象接口迁京东云
|
|
|
|
//kk TODO : 2023/9/5 大象接口迁京东云
|
|
|
|
//https://js.ele12.com/
|
|
|
|
//https://js.ele12.com/
|
|
|
|
// host = "https://js.ele12.com/order-api";
|
|
|
|
// host = "https://js.ele12.com/order-api";
|
|
|
|