|
|
@ -92,14 +92,9 @@ public class JdServiceImpl implements JdService { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public String getToken() throws Exception { |
|
|
|
public String getToken() throws Exception { |
|
|
|
Object token = redisUtil.get("jd_access_token"); |
|
|
|
Object token = redisUtil.get("jd_access_token"); |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 10; i++) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (token == null) { |
|
|
|
if (token == null) { |
|
|
|
// 请求回调 会在回调存入参数
|
|
|
|
// 请求回调 会在回调存入参数
|
|
|
|
JdPostService.getAccessToken(); |
|
|
|
JdPostService.getAccessToken(); |
|
|
|
getToken(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return token.toString(); |
|
|
|
return token.toString(); |
|
|
|
} |
|
|
|
} |
|
|
|