address add bystoreid api
This commit is contained in:
@@ -78,22 +78,22 @@ type ServiceContext struct {
|
||||
DB *gorm.DB
|
||||
Prefix string
|
||||
|
||||
ExpressSvcName string //服务名
|
||||
ProductSvcName string //服务名
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
|
||||
//启动仅读取配置,不建立rpc连接 多个服务就多个
|
||||
expressSvc := utils.GetConfigString("services.express")
|
||||
productSvc := utils.GetConfigString("services.product")
|
||||
|
||||
if expressSvc == utils.StringEmpty {
|
||||
logx.Error("config services.express empty")
|
||||
if productSvc == utils.StringEmpty {
|
||||
logx.Error("config services.product empty")
|
||||
}
|
||||
|
||||
svcCtx := &ServiceContext{
|
||||
Config: c,
|
||||
DB: db,
|
||||
Prefix: utils.GetConfigString("mysql.prefix"),
|
||||
ExpressSvcName: expressSvc,
|
||||
ProductSvcName: productSvc,
|
||||
}
|
||||
|
||||
return svcCtx
|
||||
|
||||
Reference in New Issue
Block a user