mirror of
https://github.com/go-home-admin/toolset.git
synced 2026-04-23 00:27:03 +08:00
add: 兼容事务
This commit is contained in:
@@ -14,7 +14,7 @@ func (orm *OrmMysqlTableName) TableName() string {
|
||||
func NewOrmMysqlTableName(txs ...*gorm.DB) *OrmMysqlTableName {
|
||||
var tx *gorm.DB
|
||||
if len(txs) == 0 {
|
||||
tx = providers.GetBean("mysql, mysql").(*gorm.DB).Model(&Player{})
|
||||
tx = providers.GetBean("mysql, mysql").(*gorm.DB).Model(&MysqlTableName{})
|
||||
} else {
|
||||
tx = txs[0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user