更新数量获取
This commit is contained in:
parent
cf7789b970
commit
0bda3657c6
2
base.go
2
base.go
@ -60,7 +60,7 @@ func (b *BaseDao) Detail(dbInstance *gorm.DB, table string, result interface{},
|
||||
func (b *BaseDao) Count(dbInstance *gorm.DB, table string, optionFuncList ...SetOption) (int64, error) {
|
||||
b.setTxCondition(dbInstance, table, optionFuncList...)
|
||||
var cnt int64
|
||||
return cnt, dbInstance.Count(&cnt).Error
|
||||
return cnt, dbInstance.Table(table).Count(&cnt).Error
|
||||
}
|
||||
|
||||
// Begin 开启事务
|
||||
|
Loading…
Reference in New Issue
Block a user