feat: 更新用户类型字段为"System"并添加用户来源字段
This commit is contained in:
@@ -71,11 +71,12 @@ func (s *RegisterImpl) ByUserName(username, password, userType string) (string,
|
||||
Password: password, // 原始密码
|
||||
Status: common.STATUS_YES, // 账号状态激活
|
||||
DeptID: "100", // 归属部门为根节点
|
||||
CreateBy: "register", // 创建来源
|
||||
CreateBy: "System", // 创建来源
|
||||
}
|
||||
// 标记用户类型
|
||||
if userType == "" {
|
||||
sysUser.UserType = "sys"
|
||||
sysUser.UserType = "System"
|
||||
sysUser.UserSource = "#"
|
||||
}
|
||||
// 新增用户的角色管理
|
||||
sysUser.RoleIDs = s.registerRoleInit(userType)
|
||||
@@ -91,7 +92,7 @@ func (s *RegisterImpl) ByUserName(username, password, userType string) (string,
|
||||
|
||||
// registerRoleInit 注册初始角色
|
||||
func (s *RegisterImpl) registerRoleInit(userType string) []string {
|
||||
if userType == "sys" {
|
||||
if userType == "System" {
|
||||
return []string{}
|
||||
}
|
||||
return []string{}
|
||||
@@ -99,7 +100,7 @@ func (s *RegisterImpl) registerRoleInit(userType string) []string {
|
||||
|
||||
// registerPostInit 注册初始岗位
|
||||
func (s *RegisterImpl) registerPostInit(userType string) []string {
|
||||
if userType == "sys" {
|
||||
if userType == "System" {
|
||||
return []string{}
|
||||
}
|
||||
return []string{}
|
||||
|
||||
Reference in New Issue
Block a user