This commit is contained in:
dute7liang
2024-01-07 16:42:24 +08:00
parent 31af6fdc76
commit fad404fe58
52 changed files with 257 additions and 176 deletions

View File

@@ -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());