|
@@ -106,11 +106,12 @@ public final class ThirdPartyAccessInterceptor implements HandlerInterceptor {
|
|
|
redisClient.set(key, thirdPartyAccessBean, 60000);
|
|
|
}
|
|
|
|
|
|
- long timestampLong = Long.parseLong(timestamp);
|
|
|
-
|
|
|
- long currentTimeMillis = System.currentTimeMillis();
|
|
|
- if (Math.abs(currentTimeMillis - timestampLong) > thirdPartyAccessBean.getTimeRange()) {
|
|
|
- throw new StatusException("B-001203", "timestamp超出时间差范围");
|
|
|
+ if (null != thirdPartyAccessBean.getTimeRange()) {
|
|
|
+ long timestampLong = Long.parseLong(timestamp);
|
|
|
+ long currentTimeMillis = System.currentTimeMillis();
|
|
|
+ if (Math.abs(currentTimeMillis - timestampLong) > thirdPartyAccessBean.getTimeRange()) {
|
|
|
+ throw new StatusException("B-001203", "timestamp超出时间差范围");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
String secretKey = thirdPartyAccessBean.getSecretKey();
|