diff --git a/base.go b/base.go index 4caf48d..d9ec17e 100644 --- a/base.go +++ b/base.go @@ -56,8 +56,8 @@ 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 = b.setTxCondition(dbInstance, optionFuncList...) - return dbInstance.Table(b.TableName).Delete(dataModel).RowsAffected, dbInstance.Delete(dataModel).Error + dbInstance = b.setTxCondition(dbInstance, optionFuncList...).Table(b.TableName).Delete(dataModel) + return dbInstance.RowsAffected, dbInstance.Error } // Detail 查询详情