作者 陈志颖

fix:修复共创模式批量删除问题

@@ -172,6 +172,9 @@ func (repository *CooperationModeRepository) Find(queryOptions map[string]interf @@ -172,6 +172,9 @@ func (repository *CooperationModeRepository) Find(queryOptions map[string]interf
172 var cooperationModeModels []*models.CooperationMode 172 var cooperationModeModels []*models.CooperationMode
173 cooperationModes := make([]*domain.CooperationMode, 0) 173 cooperationModes := make([]*domain.CooperationMode, 0)
174 query := sqlbuilder.BuildQuery(tx.Model(&cooperationModeModels), queryOptions) 174 query := sqlbuilder.BuildQuery(tx.Model(&cooperationModeModels), queryOptions)
  175 + if cooperationModeIds, ok := queryOptions["cooperationModeIds"]; ok && len(cooperationModeIds.([]int64)) > 0 {
  176 + query.Where("cooperation_mode_id in (?)", pg.In(cooperationModeIds))
  177 + }
175 if cooperationModeName, ok := queryOptions["cooperationModeName"]; ok && cooperationModeName != "" { 178 if cooperationModeName, ok := queryOptions["cooperationModeName"]; ok && cooperationModeName != "" {
176 query.Where("cooperation_mode_name like ?", fmt.Sprintf("%%%s%%", cooperationModeName)) 179 query.Where("cooperation_mode_name like ?", fmt.Sprintf("%%%s%%", cooperationModeName))
177 } 180 }