修复delete方法的BUG

This commit is contained in:
白茶清欢 2023-03-19 12:46:22 +08:00
parent 9f569069d5
commit 2c9983a2d3
1 changed files with 2 additions and 2 deletions

View File

@ -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 查询详情