From 38187b9d485880f7d5533efc2ee723b44d08f2b7 Mon Sep 17 00:00:00 2001 From: HuangZhi Date: Wed, 5 Jul 2023 14:55:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=8E=B7=E5=8F=96=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/system_user.go | 2 +- src/service/system_user.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controller/system_user.go b/src/controller/system_user.go index 54f6717..872ce03 100644 --- a/src/controller/system_user.go +++ b/src/controller/system_user.go @@ -35,7 +35,7 @@ func OrgUserRoles(c *gin.Context) { return } svc := service.User{} - result, err := svc.OrgUserRoles(cast.ToInt(oid)) + result, err := svc.OrgUserRoles(oid) if err != nil { SendJsonResponse(c, err, nil) return diff --git a/src/service/system_user.go b/src/service/system_user.go index 223b659..29e3e78 100644 --- a/src/service/system_user.go +++ b/src/service/system_user.go @@ -64,14 +64,14 @@ func (o *User) OrgUserDetail(id int) (interface{}, error) { } // 组织添加用户时查询角色列表 查询非内置角色 + 平台运营者 -func (o *User) OrgUserRoles(oid int) (interface{}, error) { +func (o *User) OrgUserRoles(oid string) (interface{}, error) { db, err := client.GetDbClient() if err != nil { return nil, resp.DbConnectError.ErrorDetail(err) } var org entity.SystemOrganization - _, err = db.Table("system_organization").Where("id = ?", oid).Get(&org) + _, err = db.Table("system_organization").Where("organization_id = ?", oid).Get(&org) if err != nil { conf.Logger.Error("查询机构信息失败", zap.Error(err)) return nil, resp.DbSelectError.ErrorDetail(err) -- 2.26.0