提交 2bd46f80 编写于 作者: S shiziyuan9527

新建用户时设置用户来源

上级 d9ab83af
......@@ -5,6 +5,7 @@ import io.metersphere.base.mapper.*;
import io.metersphere.base.mapper.ext.ExtUserMapper;
import io.metersphere.base.mapper.ext.ExtUserRoleMapper;
import io.metersphere.commons.constants.RoleConstants;
import io.metersphere.commons.constants.UserSource;
import io.metersphere.commons.constants.UserStatus;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.user.SessionUser;
......@@ -137,6 +138,7 @@ public class UserService {
user.setUpdateTime(System.currentTimeMillis());
// 默认1:启用状态
user.setStatus(UserStatus.NORMAL);
user.setSource(UserSource.Local.name());
// 密码使用 MD5
user.setPassword(CodingUtil.md5(user.getPassword()));
UserExample userExample = new UserExample();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册