|
@@ -71,7 +71,7 @@ public class ApiAspect {
|
|
|
String token = CommonUtils.getToken(request);
|
|
|
log.info("用户token:{} 访问 {}", token, request.getRequestURI());
|
|
|
String jwtUserId = CommonUtils.getUserId(request);
|
|
|
- if (StringUtils.isNotBlank(jwtUserId) && token.equals(jwtUserId)) {
|
|
|
+ if (StringUtils.isNotBlank(jwtUserId) && StringUtils.isNotBlank(token) && token.equals(jwtUserId)) {
|
|
|
throw new RemoteServiceException(ResponseHelper.ResponseCode_TOKEN_ID_ERROR, "请求不合法, token");
|
|
|
}
|
|
|
|