|
@@ -4,6 +4,7 @@ package com.gree.mall.miniapp.utils;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.gree.mall.miniapp.constant.Constant;
|
|
|
import com.gree.mall.miniapp.exception.RemoteServiceException;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.jdom.Document;
|
|
|
import org.jdom.Element;
|
|
@@ -22,6 +23,7 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
+@Slf4j
|
|
|
public class CommonUtils {
|
|
|
|
|
|
|
|
@@ -124,6 +126,7 @@ public class CommonUtils {
|
|
|
if(StringUtils.isBlank(token)){
|
|
|
return null;
|
|
|
}
|
|
|
+ log.info("CommonUtils.getUserId()从token获取userId:{}", token);
|
|
|
return JwtUtils.validateJWT(token).getClaims().getId();
|
|
|
}catch(Exception e){
|
|
|
return "";
|