fix(系统设置): LDAP用户首次登录系统失败

--bug=1018387 --user=李玉号 【系统设置】LDAP用户首次登录系统失败,再次登录成,但是页面显示需要优化
https://www.tapd.cn/55049933/s/1267896
This commit is contained in:
shiziyuan9527 2022-10-19 17:15:00 +08:00 committed by lyh
parent 6c2a01d419
commit 111505f77d
2 changed files with 3 additions and 2 deletions

View File

@ -98,7 +98,7 @@ public class LdapService {
}
user.setSource(UserSource.LDAP.name());
userLoginService.addLdapUser(user);
u = userLoginService.addLdapUser(user);
} else {
// 更新
u.setName(name);

View File

@ -332,12 +332,13 @@ public class UserLoginService {
userMapper.insertSelective(user);
}
public void addLdapUser(User user) {
public User addLdapUser(User user) {
user.setCreateTime(System.currentTimeMillis());
user.setUpdateTime(System.currentTimeMillis());
user.setStatus(UserStatus.NORMAL);
checkEmailIsExist(user.getEmail());
userMapper.insertSelective(user);
return user;
}
private void checkEmailIsExist(String email) {