fix:支付
This commit is contained in:
@@ -2,6 +2,7 @@ package svc
|
||||
|
||||
import (
|
||||
"fusenapi/server/order/internal/config"
|
||||
"fusenapi/utils/queue"
|
||||
|
||||
"fusenapi/initalize"
|
||||
"fusenapi/model/gmodel"
|
||||
@@ -15,17 +16,22 @@ type ServiceContext struct {
|
||||
MysqlConn *gorm.DB
|
||||
AllModels *gmodel.AllModelsGen
|
||||
Repositories *initalize.Repositories
|
||||
DelayQueue *queue.DelayMessage
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
conn := initalize.InitMysql(c.SourceMysql)
|
||||
delayQueue := initalize.InitDelayMessage()
|
||||
repositories := initalize.NewAllRepositories(&initalize.NewAllRepositorieData{
|
||||
GormDB: conn,
|
||||
DelayQueue: delayQueue,
|
||||
})
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: conn,
|
||||
AllModels: gmodel.NewAllModels(conn),
|
||||
Repositories: initalize.NewAllRepositories(&initalize.NewAllRepositorieData{
|
||||
GormDB: conn,
|
||||
}),
|
||||
Config: c,
|
||||
MysqlConn: conn,
|
||||
AllModels: gmodel.NewAllModels(conn),
|
||||
Repositories: repositories,
|
||||
DelayQueue: delayQueue,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user