lyhzzz 2 lat temu
rodzic
commit
77f22d7cf3

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/impl/LoginLogServiceImpl.java

@@ -26,7 +26,7 @@ public class LoginLogServiceImpl extends ServiceImpl<ILoginLogMapper, LoginLog>
     RedisUtil redisUtil;
     RedisUtil redisUtil;
 
 
     @Override
     @Override
-    public void addLog(String clientIP, String token) {
+    public synchronized void addLog(String clientIP, String token) {
         try {
         try {
             String tokenKey = "ucenter:active:token:"+ token;
             String tokenKey = "ucenter:active:token:"+ token;
             if(redisUtil.hasKey(tokenKey)){
             if(redisUtil.hasKey(tokenKey)){