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