From 48b7e7d00cc3e63a36297ea38171691393f2fe48 Mon Sep 17 00:00:00 2001 From: HuangZhi Date: Thu, 6 Jul 2023 09:38:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bean/vo/response/system_organization.go | 1 + src/router/system_access_rule.go | 4 ++-- src/service/system_user.go | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bean/vo/response/system_organization.go b/src/bean/vo/response/system_organization.go index 2d5b8ab..c48de7e 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 537bd93..b265288 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 38fc939..cbc9f8a 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 } -- 2.26.0