|
@@ -1,23 +1,20 @@
|
|
|
package com.gree.mall.miniapp.config.aop;
|
|
|
|
|
|
-import com.gree.mall.miniapp.constant.Constant;
|
|
|
-import com.gree.mall.miniapp.utils.RedisUtil;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import com.gree.mall.miniapp.annotation.ApiNotAuth;
|
|
|
+import com.gree.mall.miniapp.constant.Constant;
|
|
|
import com.gree.mall.miniapp.exception.RemoteServiceException;
|
|
|
import com.gree.mall.miniapp.helper.ResponseHelper;
|
|
|
import com.gree.mall.miniapp.plus.entity.User;
|
|
|
import com.gree.mall.miniapp.plus.service.UserService;
|
|
|
import com.gree.mall.miniapp.utils.CommonUtils;
|
|
|
-import com.gree.mall.miniapp.helper.ResponseHelper;
|
|
|
-import com.gree.mall.miniapp.utils.CommonUtils;
|
|
|
+import com.gree.mall.miniapp.utils.RedisUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.aspectj.lang.JoinPoint;
|
|
|
import org.aspectj.lang.annotation.Aspect;
|
|
|
import org.aspectj.lang.annotation.Before;
|
|
|
import org.aspectj.lang.annotation.Pointcut;
|
|
|
import org.aspectj.lang.reflect.MethodSignature;
|
|
|
-import org.omg.CORBA.Environment;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.core.annotation.Order;
|
|
@@ -72,6 +69,7 @@ public class ApiAspect {
|
|
|
}
|
|
|
}
|
|
|
String token = CommonUtils.getToken(request);
|
|
|
+ log.info("用户token:{}" + token + " 访问" + request.getRequestURI());
|
|
|
//String userId = CommonUtils.getUserId(request);
|
|
|
String userId = (String)redisUtil.get(Constant.RedisPrefix.TOKEN_WX+token);
|
|
|
if (StringUtils.isBlank(userId)) {
|