Browse Source

no message

FengChaoYu 2 months ago
parent
commit
aa66b8fb6f

+ 2 - 2
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/config/aop/ApiAspect.java

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