Commit 38187b9d authored by 黄智's avatar 黄智

调整获取角色列表

parent 3cb81b59
...@@ -35,7 +35,7 @@ func OrgUserRoles(c *gin.Context) { ...@@ -35,7 +35,7 @@ func OrgUserRoles(c *gin.Context) {
return return
} }
svc := service.User{} svc := service.User{}
result, err := svc.OrgUserRoles(cast.ToInt(oid)) result, err := svc.OrgUserRoles(oid)
if err != nil { if err != nil {
SendJsonResponse(c, err, nil) SendJsonResponse(c, err, nil)
return return
......
...@@ -64,14 +64,14 @@ func (o *User) OrgUserDetail(id int) (interface{}, error) { ...@@ -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() db, err := client.GetDbClient()
if err != nil { if err != nil {
return nil, resp.DbConnectError.ErrorDetail(err) return nil, resp.DbConnectError.ErrorDetail(err)
} }
var org entity.SystemOrganization 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 { if err != nil {
conf.Logger.Error("查询机构信息失败", zap.Error(err)) conf.Logger.Error("查询机构信息失败", zap.Error(err))
return nil, resp.DbSelectError.ErrorDetail(err) return nil, resp.DbSelectError.ErrorDetail(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment