|
@@ -1,5 +1,6 @@
|
|
|
package com.gree.mall.miniapp.config.aop;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import com.gree.mall.miniapp.annotation.ApiNotAuth;
|
|
|
import com.gree.mall.miniapp.constant.Constant;
|
|
|
import com.gree.mall.miniapp.exception.RemoteServiceException;
|
|
@@ -24,6 +25,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.lang.reflect.Method;
|
|
|
+import java.util.Date;
|
|
|
|
|
|
@Aspect
|
|
|
@Component
|
|
@@ -77,7 +79,9 @@ public class ApiAspect {
|
|
|
|
|
|
|
|
|
//String userId = CommonUtils.getUserId(request);
|
|
|
+ log.info("用户"+jwtUserId+"redis开始时间"+ DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
String userId = (String)redisUtil.get(Constant.RedisPrefix.TOKEN_WX+token);
|
|
|
+ log.info("用户"+jwtUserId+"redis结束时间"+ DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
if (StringUtils.isBlank(userId) || StringUtils.isBlank(jwtUserId)) {
|
|
|
throw new RemoteServiceException(ResponseHelper.ResponseCode_TOKEN_ID_ERROR, "请求不合法");
|
|
|
}
|