fix(系统设置): LDAP用户首次登录系统失败
--bug=1018387 --user=李玉号 【系统设置】LDAP用户首次登录系统失败,再次登录成,但是页面显示需要优化 https://www.tapd.cn/55049933/s/1267896
This commit is contained in:
parent
6c2a01d419
commit
111505f77d
|
@ -98,7 +98,7 @@ public class LdapService {
|
||||||
}
|
}
|
||||||
|
|
||||||
user.setSource(UserSource.LDAP.name());
|
user.setSource(UserSource.LDAP.name());
|
||||||
userLoginService.addLdapUser(user);
|
u = userLoginService.addLdapUser(user);
|
||||||
} else {
|
} else {
|
||||||
// 更新
|
// 更新
|
||||||
u.setName(name);
|
u.setName(name);
|
||||||
|
|
|
@ -332,12 +332,13 @@ public class UserLoginService {
|
||||||
userMapper.insertSelective(user);
|
userMapper.insertSelective(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addLdapUser(User user) {
|
public User addLdapUser(User user) {
|
||||||
user.setCreateTime(System.currentTimeMillis());
|
user.setCreateTime(System.currentTimeMillis());
|
||||||
user.setUpdateTime(System.currentTimeMillis());
|
user.setUpdateTime(System.currentTimeMillis());
|
||||||
user.setStatus(UserStatus.NORMAL);
|
user.setStatus(UserStatus.NORMAL);
|
||||||
checkEmailIsExist(user.getEmail());
|
checkEmailIsExist(user.getEmail());
|
||||||
userMapper.insertSelective(user);
|
userMapper.insertSelective(user);
|
||||||
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkEmailIsExist(String email) {
|
private void checkEmailIsExist(String email) {
|
||||||
|
|
Loading…
Reference in New Issue