正在显示
1 个修改的文件
包含
3 行增加
和
0 行删除
@@ -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 | } |
-
请 注册 或 登录 后发表评论