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{}
|
||||
|
||||
@@ -715,7 +715,8 @@ func (s *SysUserController) ImportData(c *gin.Context) {
|
||||
|
||||
// 构建用户实体信息
|
||||
newSysUser := model.SysUser{
|
||||
UserType: "sys",
|
||||
UserType: "System",
|
||||
UserSource: "#",
|
||||
Password: initPassword,
|
||||
DeptID: row["I"],
|
||||
UserName: row["B"],
|
||||
|
||||
@@ -12,7 +12,7 @@ type SysLogOperate struct {
|
||||
Method string `json:"method"`
|
||||
// 请求方式
|
||||
RequestMethod string `json:"requestMethod"`
|
||||
// 操作人员类别(0其它 1后台用户 2手机端用户)
|
||||
// 操作人员类别 来自用户类型
|
||||
OperatorType string `json:"operatorType"`
|
||||
// 操作人员
|
||||
OperName string `json:"operName"`
|
||||
|
||||
Reference in New Issue
Block a user