|
@@ -57,14 +57,6 @@ public class AuthInterceptor implements HandlerInterceptor {
|
|
log.info("backend HandlerInterceptor preHandle is come in");
|
|
log.info("backend HandlerInterceptor preHandle is come in");
|
|
String url = request.getServletPath();
|
|
String url = request.getServletPath();
|
|
String method = request.getMethod();
|
|
String method = request.getMethod();
|
|
- Platform platform = Platform.valueOf(ServletUtil.getRequestPlatform());
|
|
|
|
- String deviceId = ServletUtil.getRequestDeviceId();
|
|
|
|
- if (Objects.isNull(platform) || Objects.equals(platform, "")) {
|
|
|
|
- throw new BusinessException(ExceptionResultEnum.PLATFORM_INVALID);
|
|
|
|
- }
|
|
|
|
- if (Objects.isNull(deviceId) || Objects.equals(deviceId, "")) {
|
|
|
|
- throw new BusinessException(ExceptionResultEnum.DEVICE_ID_INVALID);
|
|
|
|
- }
|
|
|
|
if (url.equalsIgnoreCase(SystemConstant.ERROR)) {
|
|
if (url.equalsIgnoreCase(SystemConstant.ERROR)) {
|
|
if (response.getStatus() == HttpStatus.HTTP_NOT_FOUND) {
|
|
if (response.getStatus() == HttpStatus.HTTP_NOT_FOUND) {
|
|
throw new BusinessException(ExceptionResultEnum.NOT_FOUND);
|
|
throw new BusinessException(ExceptionResultEnum.NOT_FOUND);
|
|
@@ -74,6 +66,14 @@ public class AuthInterceptor implements HandlerInterceptor {
|
|
throw new BusinessException(ExceptionResultEnum.EXCEPTION_ERROR);
|
|
throw new BusinessException(ExceptionResultEnum.EXCEPTION_ERROR);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ Platform platform = Platform.valueOf(ServletUtil.getRequestPlatform());
|
|
|
|
+ String deviceId = ServletUtil.getRequestDeviceId();
|
|
|
|
+ if (Objects.isNull(platform) || Objects.equals(platform, "")) {
|
|
|
|
+ throw new BusinessException(ExceptionResultEnum.PLATFORM_INVALID);
|
|
|
|
+ }
|
|
|
|
+ if (Objects.isNull(deviceId) || Objects.equals(deviceId, "")) {
|
|
|
|
+ throw new BusinessException(ExceptionResultEnum.DEVICE_ID_INVALID);
|
|
|
|
+ }
|
|
Long userId = null;
|
|
Long userId = null;
|
|
// Long timestamp = Long.parseLong(ServletUtil.getRequestTime(request));
|
|
// Long timestamp = Long.parseLong(ServletUtil.getRequestTime(request));
|
|
// if (!SystemConstant.expire(timestamp.longValue())) {
|
|
// if (!SystemConstant.expire(timestamp.longValue())) {
|