hexiao hace 2 años
padre
commit
314fef070d

+ 2 - 1
purchase-framework/src/main/java/com/ozs/framework/web/service/TokenService.java

@@ -5,6 +5,7 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import javax.servlet.http.HttpServletRequest;
 
+import com.ozs.common.config.PurchaseConfig;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
@@ -111,7 +112,7 @@ public class TokenService {
         loginUser.setToken(token);
         setUserAgent(loginUser);
 
-        if (!loginUser.getUserId().equals(Long.parseLong("-1"))) {
+        if (!loginUser.getUsername().equals(PurchaseConfig.getSname())) {
             refreshToken(loginUser);
         }
         Map<String, Object> claims = new HashMap<>();