This commit is contained in:
Mrx
2026-05-09 21:39:32 +08:00
parent f2ac09acdd
commit fe18036478
3 changed files with 13 additions and 16 deletions

View File

@@ -190,9 +190,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
// ============================== 业务服务初始化 ==============================
alipayService := service.NewAliPayService(c)
// wechatPayService := service.NewWechatPayService(c, userAuthModel, service.InitTypeWxPayPubKey)
// 为暂时关闭微信支付,将 WechatPayService 置为 nil避免在项目启动时初始化微信支付相关配置
var wechatPayService *service.WechatPayService
wechatPayService := service.NewWechatPayService(c, userAuthModel, service.InitTypeWxPayPubKey)
applePayService := service.NewApplePayService(c)
apiRequestService := service.NewApiRequestService(c, featureModel, productFeatureModel, tianyuanapi)
verificationService := service.NewVerificationService(c, tianyuanapi, apiRequestService)
@@ -223,8 +221,8 @@ func NewServiceContext(c config.Config) *ServiceContext {
// ============================== 返回服务上下文 ==============================
return &ServiceContext{
Config: c,
Redis: redisClient,
Config: c,
Redis: redisClient,
AuthInterceptor: middleware.NewAuthInterceptorMiddleware(c).Handle,
UserAuthInterceptor: middleware.NewUserAuthInterceptorMiddleware().Handle,
UserDisableInterceptor: middleware.NewUserDisableInterceptorMiddleware(userModel).Handle,