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