diff --git a/base.go b/base.go index 2651cef..b2035c7 100644 --- a/base.go +++ b/base.go @@ -74,6 +74,7 @@ func (b *BaseDao) List(dbInstance *gorm.DB, result interface{}, optionFuncList . // // Date : 11:46 2023/2/9 func (b *BaseDao) Delete(dbInstance *gorm.DB, dataModel interface{}, optionFuncList ...SetOption) (int64, error) { + dbInstance = dbInstance.Model(dataModel) dbInstance = b.setTxCondition(dbInstance, optionFuncList...).Delete(dataModel) return dbInstance.RowsAffected, dbInstance.Error }