fix
This commit is contained in:
@@ -18,6 +18,7 @@ type ServiceContext struct {
|
||||
{{.middleware}}
|
||||
MysqlConn *gorm.DB
|
||||
AllModels *gmodel.AllModelsGen
|
||||
RabbitMq *initalize.RabbitMqHandle
|
||||
}
|
||||
|
||||
func NewServiceContext(c {{.config}}) *ServiceContext {
|
||||
@@ -26,6 +27,7 @@ func NewServiceContext(c {{.config}}) *ServiceContext {
|
||||
Config: c,
|
||||
MysqlConn: initalize.InitMysql(c.SourceMysql),
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
RabbitMq:initalize.InitRabbitMq(c.SourceRabbitMq, nil),
|
||||
{{.middlewareAssignment}}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user