作者 陈志颖

fix:批量删除用户

@@ -352,7 +352,7 @@ func (service SyncEmployeeService) deleteEmployeeData(data DeleteUserData) error @@ -352,7 +352,7 @@ func (service SyncEmployeeService) deleteEmployeeData(data DeleteUserData) error
352 if err = usersRepository.Remove(data.Ids); err != nil { 352 if err = usersRepository.Remove(data.Ids); err != nil {
353 return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error()) 353 return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error())
354 } 354 }
355 - // TODO 删除栏目设置 355 + // 删除栏目设置
356 var columnSettingRepository domain.ColumnSettingRepository 356 var columnSettingRepository domain.ColumnSettingRepository
357 if value, errFac := factory.CreateColumnSettingRepository(map[string]interface{}{ 357 if value, errFac := factory.CreateColumnSettingRepository(map[string]interface{}{
358 "transactionContext": transactionContext, 358 "transactionContext": transactionContext,
@@ -123,7 +123,7 @@ func (repository *ColumnSettingRepository) Find(queryOptions map[string]interfac @@ -123,7 +123,7 @@ func (repository *ColumnSettingRepository) Find(queryOptions map[string]interfac
123 var columnSettingModels []*models.ColumnSetting 123 var columnSettingModels []*models.ColumnSetting
124 columnSettings := make([]*domain.ColumnSetting, 0) 124 columnSettings := make([]*domain.ColumnSetting, 0)
125 query := tx.Model(&columnSettingModels) 125 query := tx.Model(&columnSettingModels)
126 - if ids, ok := queryOptions["ids"]; ok { 126 + if ids, ok := queryOptions["ids"]; ok && len(ids.([]int64)) != 0 {
127 query = query.Where("column_setting.uid IN (?)", pg.In(ids.([]int64))) 127 query = query.Where("column_setting.uid IN (?)", pg.In(ids.([]int64)))
128 } 128 }
129 if uid, ok := queryOptions["uid"]; ok { 129 if uid, ok := queryOptions["uid"]; ok {