...
|
...
|
@@ -78,13 +78,15 @@ func (repository *ColumnSettingRepository) Remove(columnSetting *domain.ColumnSe |
|
|
|
|
|
// 批量删除
|
|
|
if len(columnSettings) > 0 {
|
|
|
var columnSettingModels []models.ColumnSetting
|
|
|
//var columnSettingModels []models.ColumnSetting
|
|
|
var ids []int64
|
|
|
for _, setting := range columnSettings {
|
|
|
columnSettingModels = append(columnSettingModels, models.ColumnSetting{
|
|
|
Id: setting.Identify().(int64),
|
|
|
})
|
|
|
ids = append(ids, setting.Identify().(int64))
|
|
|
//columnSettingModels = append(columnSettingModels, models.ColumnSetting{
|
|
|
// Id: setting.Identify().(int64),
|
|
|
//})
|
|
|
}
|
|
|
if _, err := tx.Model(&columnSettingModels).WherePK().Delete(); err != nil {
|
|
|
if _, err := tx.Model((*models.ColumnSetting)(nil)).Where("id IN (?)", ids).Delete(); err != nil {
|
|
|
return nil, columnSettings, err
|
|
|
}
|
|
|
}
|
...
|
...
|
|