|
@@ -204,7 +204,9 @@ func (repository *UserRepository) Find(queryOptions map[string]interface{}) (int |
|
@@ -204,7 +204,9 @@ func (repository *UserRepository) Find(queryOptions map[string]interface{}) (int |
204
|
query.SetWhereByQueryOption("(user_type & ?)>0", "userType")
|
204
|
query.SetWhereByQueryOption("(user_type & ?)>0", "userType")
|
205
|
query.SetWhereByQueryOption("enable_status=?", "enableStatus")
|
205
|
query.SetWhereByQueryOption("enable_status=?", "enableStatus")
|
206
|
query.SetWhereByQueryOption(fmt.Sprintf(`user_role @> '[{"roleId":%v}]'`, queryOptions["roleId"]), "roleId")
|
206
|
query.SetWhereByQueryOption(fmt.Sprintf(`user_role @> '[{"roleId":%v}]'`, queryOptions["roleId"]), "roleId")
|
207
|
-
|
207
|
+ if v, ok := queryOptions["inEnableStatus"]; ok && len(v.([]int)) > 0 {
|
|
|
208
|
+ query.Where(`enable_status in (?)`, pg.In(v))
|
|
|
209
|
+ }
|
208
|
if v, ok := queryOptions["depName"]; ok && len(v.(string)) > 0 {
|
210
|
if v, ok := queryOptions["depName"]; ok && len(v.(string)) > 0 {
|
209
|
query.Where(fmt.Sprintf(`ext->>'depName' like '%%%v%%'`, v))
|
211
|
query.Where(fmt.Sprintf(`ext->>'depName' like '%%%v%%'`, v))
|
210
|
}
|
212
|
}
|