init
This commit is contained in:
@@ -140,7 +140,7 @@ public class CaiLoginManager {
|
||||
}
|
||||
String key = LockManager.getDealInviteLockKey(inviteId);
|
||||
RLock lock = redissonClient.getLock(key);
|
||||
if(!lock.isLocked()){
|
||||
if(lock.isLocked()){
|
||||
log.warn("点击太快了,等一等,dealInviteId");
|
||||
return;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class CaiLoginManager {
|
||||
UserInfo userInfo = userInfoService.getById(user.getId());
|
||||
UserInfo update = new UserInfo();
|
||||
update.setUserId(user.getId());
|
||||
update.setLoginCount(userInfo.getLoginCount()+1);
|
||||
update.setLoginCount(userInfo.getLoginCount()==null?0:userInfo.getLoginCount()+1);
|
||||
update.setLastLoginIp(ip);
|
||||
update.setLastLoginTime(LocalDateTime.now());
|
||||
update.setLastLocation(address);
|
||||
@@ -239,7 +239,7 @@ public class CaiLoginManager {
|
||||
String usercode = userCodeGenService.getCodeGen();
|
||||
User add = new User();
|
||||
add.setUsercode(usercode);
|
||||
add.setNickname("蜜瓜"+usercode);
|
||||
add.setNickname("用户"+usercode);
|
||||
add.setType(0);
|
||||
add.setPassword(BCrypt.hashpw(user.getPassword()));
|
||||
add.setMobile(user.getUsername());
|
||||
|
||||
Reference in New Issue
Block a user