|
@@ -260,6 +260,9 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int |
|
@@ -260,6 +260,9 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int |
|
260
|
if cooperationProjectIds, ok := queryOptions["cooperationProjectIds"]; ok && len(cooperationProjectIds.([]int64)) > 0 {
|
260
|
if cooperationProjectIds, ok := queryOptions["cooperationProjectIds"]; ok && len(cooperationProjectIds.([]int64)) > 0 {
|
|
261
|
query.Where("cooperation_project_id IN (?)", pg.In(cooperationProjectIds))
|
261
|
query.Where("cooperation_project_id IN (?)", pg.In(cooperationProjectIds))
|
|
262
|
}
|
262
|
}
|
|
|
|
263
|
+ if cooperationProjectUndertakerType, ok := queryOptions["cooperationProjectUndertakerType"]; ok && cooperationProjectUndertakerType.(int32) != 0 {
|
|
|
|
264
|
+ query.Where(`cooperation_project.cooperation_project_undertaker_types @> '{?}'`, cooperationProjectUndertakerType)
|
|
|
|
265
|
+ }
|
|
263
|
if departmentName, ok := queryOptions["departmentName"]; ok && departmentName != "" {
|
266
|
if departmentName, ok := queryOptions["departmentName"]; ok && departmentName != "" {
|
|
264
|
query.Where("department->>'departmentName' like ? ", fmt.Sprintf("%%%s%%", departmentName))
|
267
|
query.Where("department->>'departmentName' like ? ", fmt.Sprintf("%%%s%%", departmentName))
|
|
265
|
}
|
268
|
}
|