|
|
@ -148,7 +148,10 @@ public class SdtServiceImpl implements SdtService { |
|
|
|
accessToken = sdtAppInfoEntity.getAccessToken(); |
|
|
|
Date expiresAt = sdtAppInfoEntity.getExpiresAt(); |
|
|
|
|
|
|
|
Long expireIn = getExpireIn(expiresAt); |
|
|
|
Long expireIn = -1l; |
|
|
|
if (expiresAt != null) { |
|
|
|
expireIn = getExpireIn(expiresAt); |
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(accessToken) && expireIn > 0) { |
|
|
|
// 没过期,可以用
|
|
|
@ -185,6 +188,9 @@ public class SdtServiceImpl implements SdtService { |
|
|
|
HashMap<String, Object> params = new HashMap<>(); |
|
|
|
params.put("access_token", getCachedAccessToken(customerId)); |
|
|
|
params.put("code", authCode); |
|
|
|
|
|
|
|
log.info("【山东通】获取用户信息,code:{}, access_token:{}", authCode, getCachedAccessToken(customerId)); |
|
|
|
|
|
|
|
Result<String> sdtResult = HttpClientManager.getInstance().sendGet(sdtAppInfoEntity.getApiAddress() + API_GET_USER_INFO_URL, params); |
|
|
|
if (!sdtResult.success()) { |
|
|
|
// http状态判断
|
|
|
|