作者 陈志颖

合并分支 'dev' 到 'test'

test:测试删除用户



查看合并请求 !43
... ... @@ -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
}
}
... ...