...
|
...
|
@@ -276,6 +276,7 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int |
|
|
return q, nil
|
|
|
})
|
|
|
}
|
|
|
if searchCooperationProjectExtQueriesFlag, ok := queryOptions["searchCooperationProjectExtQueriesFlag"]; ok && searchCooperationProjectExtQueriesFlag.(int) != 0 {
|
|
|
if searchCooperationProjectExtQueries, ok := queryOptions["searchCooperationProjectExtQueries"]; ok && len(searchCooperationProjectExtQueries.([]*query2.SearchCooperationProjectExtQuery)) > 0 {
|
|
|
query.WhereGroup(func(q *orm.Query) (*orm.Query, error) {
|
|
|
for _, searchCooperationProjectExtQuery := range searchCooperationProjectExtQueries.([]*query2.SearchCooperationProjectExtQuery) {
|
...
|
...
|
@@ -301,8 +302,12 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int |
|
|
return q, nil
|
|
|
})
|
|
|
}
|
|
|
query.WhereOr(`cooperation_project.cooperation_project_undertaker_types @> '{?}'`, 3) //公开
|
|
|
return q, nil
|
|
|
})
|
|
|
} else {
|
|
|
query.Where(`cooperation_project.cooperation_project_undertaker_types @> '{?}'`, 3) //公开
|
|
|
}
|
|
|
}
|
|
|
if departmentName, ok := queryOptions["departmentName"]; ok && departmentName != "" {
|
|
|
query.Where("department->>'departmentName' like ? ", fmt.Sprintf("%%%s%%", departmentName))
|
...
|
...
|
|