...
|
...
|
@@ -145,6 +145,18 @@ func (repo *EvaluationProjectRepository) Find(queryOptions map[string]interface{ |
|
|
query.Where("state = ?", v)
|
|
|
}
|
|
|
|
|
|
if v, ok := queryOptions["pmpIds"]; ok {
|
|
|
pmpIds := v.([]string)
|
|
|
if len(pmpIds) > 0 {
|
|
|
query.WhereGroup(func(query *pg.Query) (*pg.Query, error) {
|
|
|
for i := range pmpIds {
|
|
|
query.WhereOr("pmp_ids @> ?", pmpIds[i])
|
|
|
}
|
|
|
return query, nil
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if v, ok := queryOptions["limit"].(int); ok {
|
|
|
query.Limit(v)
|
|
|
}
|
...
|
...
|
|