修复delete方法的BUG
This commit is contained in:
parent
9f569069d5
commit
2c9983a2d3
4
base.go
4
base.go
@ -56,8 +56,8 @@ func (b *BaseDao) List(dbInstance *gorm.DB, result interface{}, optionFuncList .
|
|||||||
//
|
//
|
||||||
// Date : 11:46 2023/2/9
|
// Date : 11:46 2023/2/9
|
||||||
func (b *BaseDao) Delete(dbInstance *gorm.DB, dataModel interface{}, optionFuncList ...SetOption) (int64, error) {
|
func (b *BaseDao) Delete(dbInstance *gorm.DB, dataModel interface{}, optionFuncList ...SetOption) (int64, error) {
|
||||||
dbInstance = b.setTxCondition(dbInstance, optionFuncList...)
|
dbInstance = b.setTxCondition(dbInstance, optionFuncList...).Table(b.TableName).Delete(dataModel)
|
||||||
return dbInstance.Table(b.TableName).Delete(dataModel).RowsAffected, dbInstance.Delete(dataModel).Error
|
return dbInstance.RowsAffected, dbInstance.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detail 查询详情
|
// Detail 查询详情
|
||||||
|
Loading…
Reference in New Issue
Block a user