正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
@@ -338,7 +338,7 @@ func GetRoleHasRole(roleid int64, companyid int64) ([]protocol.RoleHasUser, erro | @@ -338,7 +338,7 @@ func GetRoleHasRole(roleid int64, companyid int64) ([]protocol.RoleHasUser, erro | ||
338 | datasql string = `SELECT user_company_id FROM user_role | 338 | datasql string = `SELECT user_company_id FROM user_role |
339 | WHERE company_id=? AND role_id =? AND enable_status = 1` | 339 | WHERE company_id=? AND role_id =? AND enable_status = 1` |
340 | datasql2 string = `SELECT a.nick_name,b.id AS user_company_id FROM user AS a,user_company AS b | 340 | datasql2 string = `SELECT a.nick_name,b.id AS user_company_id FROM user AS a,user_company AS b |
341 | - WHERE a.id= b.user_id AND b.id IN(?)` | 341 | + WHERE a.id= b.user_id AND b.id IN(%s)` |
342 | ) | 342 | ) |
343 | err = utils.ExecuteQueryAll(&ucid, datasql, companyid, roleid) | 343 | err = utils.ExecuteQueryAll(&ucid, datasql, companyid, roleid) |
344 | if err != nil { | 344 | if err != nil { |
@@ -348,9 +348,10 @@ func GetRoleHasRole(roleid int64, companyid int64) ([]protocol.RoleHasUser, erro | @@ -348,9 +348,10 @@ func GetRoleHasRole(roleid int64, companyid int64) ([]protocol.RoleHasUser, erro | ||
348 | if len(ucid) == 0 { | 348 | if len(ucid) == 0 { |
349 | return roleuserlist, nil | 349 | return roleuserlist, nil |
350 | } | 350 | } |
351 | - err = utils.ExecuteQueryAll(&roleuserlist, datasql2, strings.Join(ucid, ",")) | 351 | + err = utils.ExecuteQueryAll(&roleuserlist, fmt.Sprintf(datasql2, strings.Join(ucid, ","))) |
352 | if err != nil { | 352 | if err != nil { |
353 | - log.Error("获取用户时间失败;%s", err) | 353 | + log.Error("获取用户数据失败;%s", err) |
354 | } | 354 | } |
355 | + | ||
355 | return roleuserlist, nil | 356 | return roleuserlist, nil |
356 | } | 357 | } |
-
请 注册 或 登录 后发表评论