f
This commit is contained in:
@@ -85,6 +85,7 @@ type ServiceContext struct {
|
||||
ExampleModel model.ExampleModel
|
||||
GlobalNotificationsModel model.GlobalNotificationsModel
|
||||
AuthorizationDocumentModel model.AuthorizationDocumentModel
|
||||
QueryWhitelistOpLogModel model.QueryWhitelistOpLogModel
|
||||
|
||||
// 服务
|
||||
AlipayService *service.AliPayService
|
||||
@@ -100,6 +101,7 @@ type ServiceContext struct {
|
||||
AdminPromotionLinkStatsService *service.AdminPromotionLinkStatsService
|
||||
ImageService *service.ImageService
|
||||
AuthorizationService *service.AuthorizationService
|
||||
TianyuanapiClient *tianyuanapi.Client
|
||||
}
|
||||
|
||||
// NewServiceContext 创建服务上下文
|
||||
@@ -175,6 +177,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
exampleModel := model.NewExampleModel(db, cacheConf)
|
||||
globalNotificationsModel := model.NewGlobalNotificationsModel(db, cacheConf)
|
||||
authorizationDocumentModel := model.NewAuthorizationDocumentModel(db, cacheConf)
|
||||
queryWhitelistOpLogModel := model.NewQueryWhitelistOpLogModel(db, cacheConf)
|
||||
|
||||
// ============================== 第三方服务初始化 ==============================
|
||||
tianyuanapi, err := tianyuanapi.NewClient(tianyuanapi.Config{
|
||||
@@ -287,6 +290,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
ExampleModel: exampleModel,
|
||||
GlobalNotificationsModel: globalNotificationsModel,
|
||||
AuthorizationDocumentModel: authorizationDocumentModel,
|
||||
QueryWhitelistOpLogModel: queryWhitelistOpLogModel,
|
||||
|
||||
// 服务
|
||||
AlipayService: alipayService,
|
||||
@@ -302,6 +306,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
AdminPromotionLinkStatsService: adminPromotionLinkStatsService,
|
||||
ImageService: imageService,
|
||||
AuthorizationService: authorizationService,
|
||||
TianyuanapiClient: tianyuanapi,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user