store
This commit is contained in:
@@ -80,6 +80,7 @@ type ServiceContext struct {
|
||||
UserName string
|
||||
ChoreName string
|
||||
MessageName string
|
||||
WeComName string
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
|
||||
@@ -107,14 +108,21 @@ func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
|
||||
if MessageSvc == utils.StringEmpty {
|
||||
logx.Error("config services.message empty")
|
||||
}
|
||||
WeComSvc := utils.GetConfigString("services.wecom")
|
||||
if WeComSvc == utils.StringEmpty {
|
||||
logx.Error("config services.wecom empty")
|
||||
}
|
||||
|
||||
svcCtx := &ServiceContext{
|
||||
Config: c,
|
||||
DB: db,
|
||||
Prefix: utils.GetConfigString("mysql.prefix"),
|
||||
SaleName: SaleSvc,
|
||||
OrderName: OrderSvc,
|
||||
UserName: UserSvc,
|
||||
ChoreName: ChoreSvc,
|
||||
Config: c,
|
||||
DB: db,
|
||||
Prefix: utils.GetConfigString("mysql.prefix"),
|
||||
SaleName: SaleSvc,
|
||||
OrderName: OrderSvc,
|
||||
UserName: UserSvc,
|
||||
ChoreName: ChoreSvc,
|
||||
MessageName: MessageSvc,
|
||||
WeComName: WeComSvc,
|
||||
}
|
||||
|
||||
return svcCtx
|
||||
|
||||
Reference in New Issue
Block a user