update delete func
This commit is contained in:
parent
f6bac5a5a0
commit
4d795cba8b
1
base.go
1
base.go
@ -74,6 +74,7 @@ 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 = dbInstance.Model(dataModel)
|
||||||
dbInstance = b.setTxCondition(dbInstance, optionFuncList...).Delete(dataModel)
|
dbInstance = b.setTxCondition(dbInstance, optionFuncList...).Delete(dataModel)
|
||||||
return dbInstance.RowsAffected, dbInstance.Error
|
return dbInstance.RowsAffected, dbInstance.Error
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user