|
...
|
...
|
@@ -196,6 +196,9 @@ func (repository *CooperationProjectRepository) Find(queryOptions map[string]int |
|
|
|
var cooperationProjectModels []*models.CooperationProject
|
|
|
|
cooperationProjects := make([]*domain.CooperationProject, 0)
|
|
|
|
query := sqlbuilder.BuildQuery(tx.Model(&cooperationProjectModels), queryOptions)
|
|
|
|
if v, ok := queryOptions["status"]; ok && v.(int32) > 0 {
|
|
|
|
query.Where("status =? ", v)
|
|
|
|
}
|
|
|
|
query.SetOffsetAndLimit(20)
|
|
|
|
query.SetOrderDirect("cooperation_project_id", "DESC")
|
|
|
|
if count, err := query.SelectAndCount(); err != nil {
|
...
|
...
|
|