作者 yangfu

模式、共创申请查询修改

... ... @@ -265,6 +265,7 @@ func (repository *CooperationApplicationRepository) Find(queryOptions map[string
// 获取共创项目
cooperationProjectModel := new(models.CooperationProject)
cooperationProjectQuery := tx.Model(cooperationProjectModel)
cooperationProjectQuery.AllWithDeleted()
if err := cooperationProjectQuery.
Where("company->>'companyId' = '?'", cooperationApplicationModel.Company.CompanyId).
Where("org->>'orgId' = '?'", cooperationApplicationModel.Org.OrgId).
... ... @@ -275,6 +276,7 @@ func (repository *CooperationApplicationRepository) Find(queryOptions map[string
// 获取共创模式
cooperationModeModel := new(models.CooperationMode)
cooperationModeQuery := tx.Model(cooperationModeModel)
cooperationModeQuery.AllWithDeleted()
if err := cooperationModeQuery.
Where("company->>'companyId' = '?'", cooperationApplicationModel.Company.CompanyId).
Where("org->>'orgId' = '?'", cooperationApplicationModel.Org.OrgId).
... ...
... ... @@ -177,7 +177,7 @@ func (repository *CooperationModeRepository) Find(queryOptions map[string]interf
query.Where("cooperation_mode_id in (?)", pg.In(cooperationModeIds))
}
if cooperationModeNumbers, ok := queryOptions["cooperationModeNumbers"]; ok && len(cooperationModeNumbers.([]string)) > 0 {
query.Where("Cooperation_mode_number in (?)", pg.In(cooperationModeNumbers))
query.Where("cooperation_mode_number in (?)", pg.In(cooperationModeNumbers))
}
if cooperationModeName, ok := queryOptions["cooperationModeName"]; ok && cooperationModeName != "" {
query.Where("cooperation_mode_name like ?", fmt.Sprintf("%%%s%%", cooperationModeName))
... ...