...
|
...
|
@@ -125,7 +125,7 @@ func (repo *RoleUserRepository) Find(queryOptions map[string]interface{}) (int64 |
|
|
}
|
|
|
|
|
|
if userIds, ok := queryOptions["userIds"]; ok {
|
|
|
query.Where("user_id in (?)", userIds)
|
|
|
query.Where("user_id in (?)", pg.In(userIds))
|
|
|
}
|
|
|
|
|
|
if v, ok := queryOptions["limit"].(int); ok {
|
...
|
...
|
@@ -182,7 +182,7 @@ func (repo *RoleUserRepository) BatchDeleteById(ids []int64) error { |
|
|
return err
|
|
|
}
|
|
|
|
|
|
func (repo *RoleUserRepository) FindAllContainUser(pageSize int, pageNumber int, companyId int64, roleId int64) ([]*domain.RoleContainUser, error) {
|
|
|
func (repo *RoleUserRepository) FindAllContainUser(pageNumber int, pageSize int, companyId int64, roleId int64) ([]*domain.RoleContainUser, error) {
|
|
|
limit := pageSize
|
|
|
offset := limit * (pageNumber - 1)
|
|
|
if offset < 0 {
|
...
|
...
|
@@ -192,7 +192,7 @@ func (repo *RoleUserRepository) FindAllContainUser(pageSize int, pageNumber int, |
|
|
"role_user".role_id,
|
|
|
"role_user".user_id,
|
|
|
"user".name as user_name,
|
|
|
"user".email as user_email,
|
|
|
"user".email as user_email
|
|
|
`
|
|
|
whereFrom := `
|
|
|
FROM "role_user"
|
...
|
...
|
|