作者 陈志颖

合并分支 'dev' 到 'test'

fix:共创项目查询



查看合并请求 !71
... ... @@ -277,6 +277,7 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int
})
}
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) {
query.WhereOrGroup(func(q *orm.Query) (*orm.Query, error) {
if searchCooperationProjectExtQuery.ExtCompanyId != 0 {
... ... @@ -300,6 +301,8 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int
return q, nil
})
}
return q, nil
})
}
if departmentName, ok := queryOptions["departmentName"]; ok && departmentName != "" {
query.Where("department->>'departmentName' like ? ", fmt.Sprintf("%%%s%%", departmentName))
... ...