作者 陈志颖

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

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