This commit is contained in:
2026-09-24 08:34:32 +08:00
parent 9b876701c3
commit e5fff985cf
15 changed files with 616 additions and 55 deletions
@@ -14,6 +14,7 @@ type ServiceContext struct {
Prefix string
ChoreSvcName string
UserSvcName string
WecomSvcName string
}
func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
@@ -25,6 +26,10 @@ func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
if userSvc == utils.StringEmpty {
logx.Error("config services.user empty")
}
wecomSvc := utils.GetConfigString("services.wecom")
if wecomSvc == utils.StringEmpty {
logx.Error("config services.wecom empty")
}
return &ServiceContext{
Config: c,
@@ -32,5 +37,6 @@ func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
Prefix: utils.GetConfigString("mysql.prefix"),
ChoreSvcName: choreSvc,
UserSvcName: userSvc,
WecomSvcName: wecomSvc,
}
}