Merge remote-tracking branch 'origin/errcode' into errcode

# Conflicts:
#	cmd/api/main.go
#	internal/api/a2r/api2rpc.go
#	internal/apiresp/resp.go
#	internal/msgtransfer/online_history_msg_handler.go
#	internal/push/consumer_init.go
#	pkg/common/db/controller/conversation.go
#	pkg/common/mw/gin.go
#	pkg/statistics/statistics.go
This commit is contained in:
withchao
2023-03-16 10:51:00 +08:00
28 changed files with 306 additions and 151 deletions
+7 -7
View File
@@ -8,19 +8,19 @@ import (
"time"
)
func NewObjectInfo(db *gorm.DB) relation.ObjectInfoModelInterface {
return &ObjectInfoGorm{
DB: db,
}
type ObjectInfoGorm struct {
*MetaDB
}
type ObjectInfoGorm struct {
DB *gorm.DB
func NewObjectInfo(db *gorm.DB) relation.ObjectInfoModelInterface {
return &ObjectInfoGorm{
NewMetaDB(db, &relation.ObjectInfoModel{}),
}
}
func (o *ObjectInfoGorm) NewTx(tx any) relation.ObjectInfoModelInterface {
return &ObjectInfoGorm{
DB: tx.(*gorm.DB),
NewMetaDB(tx.(*gorm.DB), &relation.ObjectInfoModel{}),
}
}