diff --git a/src/bean/vo/response/system_organization.go b/src/bean/vo/response/system_organization.go index 2d5b8ab482c4f2d094b3c31a8cb4729b73177ca0..c48de7e83738fb7db825827ce394f1f1de30f5f9 100644 --- a/src/bean/vo/response/system_organization.go +++ b/src/bean/vo/response/system_organization.go @@ -41,6 +41,7 @@ type OrgUserDetail struct { Phone string `json:"phone" xorm:"phone"` // 联系人电话 SystemAccount string `json:"system_account" xorm:"system_account"` // 系统账号 SystemRole []string `json:"system_role" xorm:"-"` // 系统角色id + SystemRoleName []string `json:"system_role_name" xorm:"-"` // 系统角色名称 Organization string `json:"organization" xorm:"organization"` // 所属组织 OrganizationId string `json:"organization_id"` // 所属组织 CreatedBy int `json:"created_by"` // 创建者 diff --git a/src/router/system_access_rule.go b/src/router/system_access_rule.go index 537bd93decf4272b919798482c7c8c7cc2f4cd48..b265288564e41e4373aa731c209884010664bfef 100644 --- a/src/router/system_access_rule.go +++ b/src/router/system_access_rule.go @@ -17,8 +17,8 @@ func InitAccessRuleRouter(e *gin.Engine) { rule.PUT("updateAccessRule", controller.UpdateAccessRule, header.AddLogMiddleware("访问规则管理", "/updateAccessRule", constant.OpTypeIntMap[constant.Edit])) // 编辑访问规则 rule.DELETE("delAccessRule", controller.DelAccessRule, header.AddLogMiddleware("访问规则管理", "/delAccessRule", constant.OpTypeIntMap[constant.AllDelete])) // 删除访问规则 rule.GET("listAccessRule", controller.ListAccessRule, header.AddLogMiddleware("访问规则管理", "/listAccessRule", constant.OpTypeIntMap[constant.Find])) // 查询访问规则列表 - rule.GET("listRuleUser", controller.ListRuleUser) // 查询用户详情列表 - rule.PUT("updateState", controller.UpdateState) // 修改规则状态 + rule.GET("listRuleUser", controller.ListRuleUser) // 查询用户详情列表 + rule.PUT("updateState", controller.UpdateState) // 修改规则状态 } } diff --git a/src/service/system_user.go b/src/service/system_user.go index 38fc939ab5a768dd0574c36a0974c9cbcae32e36..cbc9f8ad319ce55db8eb332cce83436405874f3c 100644 --- a/src/service/system_user.go +++ b/src/service/system_user.go @@ -59,6 +59,7 @@ func (o *User) OrgUserDetail(id int) (interface{}, error) { } for _, v := range systemUserRoles { result.SystemRole = append(result.SystemRole, v.RoleId) + result.SystemRoleName = append(result.SystemRoleName, v.RoleName) } return result, nil }