合并分支 'dev' 到 'test'
fix:共创项目查询 查看合并请求 !71
正在显示
1 个修改的文件
包含
3 行增加
和
0 行删除
@@ -277,6 +277,7 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int | @@ -277,6 +277,7 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int | ||
277 | }) | 277 | }) |
278 | } | 278 | } |
279 | if searchCooperationProjectExtQueries, ok := queryOptions["searchCooperationProjectExtQueries"]; ok && len(searchCooperationProjectExtQueries.([]*query2.SearchCooperationProjectExtQuery)) > 0 { | 279 | if searchCooperationProjectExtQueries, ok := queryOptions["searchCooperationProjectExtQueries"]; ok && len(searchCooperationProjectExtQueries.([]*query2.SearchCooperationProjectExtQuery)) > 0 { |
280 | + query.WhereGroup(func(q *orm.Query) (*orm.Query, error) { | ||
280 | for _, searchCooperationProjectExtQuery := range searchCooperationProjectExtQueries.([]*query2.SearchCooperationProjectExtQuery) { | 281 | for _, searchCooperationProjectExtQuery := range searchCooperationProjectExtQueries.([]*query2.SearchCooperationProjectExtQuery) { |
281 | query.WhereOrGroup(func(q *orm.Query) (*orm.Query, error) { | 282 | query.WhereOrGroup(func(q *orm.Query) (*orm.Query, error) { |
282 | if searchCooperationProjectExtQuery.ExtCompanyId != 0 { | 283 | if searchCooperationProjectExtQuery.ExtCompanyId != 0 { |
@@ -300,6 +301,8 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int | @@ -300,6 +301,8 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int | ||
300 | return q, nil | 301 | return q, nil |
301 | }) | 302 | }) |
302 | } | 303 | } |
304 | + return q, nil | ||
305 | + }) | ||
303 | } | 306 | } |
304 | if departmentName, ok := queryOptions["departmentName"]; ok && departmentName != "" { | 307 | if departmentName, ok := queryOptions["departmentName"]; ok && departmentName != "" { |
305 | query.Where("department->>'departmentName' like ? ", fmt.Sprintf("%%%s%%", departmentName)) | 308 | query.Where("department->>'departmentName' like ? ", fmt.Sprintf("%%%s%%", departmentName)) |
-
请 注册 或 登录 后发表评论