This commit is contained in:
2026-05-15 21:21:29 +08:00
parent c0ac84fac8
commit 98eb587cf1
2 changed files with 33 additions and 33 deletions

View File

@@ -28,10 +28,10 @@ func NewAliPayService(c config.Config) *AliPayService {
panic(fmt.Sprintf("创建支付宝客户端失败: %v", err)) panic(fmt.Sprintf("创建支付宝客户端失败: %v", err))
} }
// 加载支付宝公钥 // 加载支付宝公钥
err = client.LoadAliPayPublicKey(c.Alipay.AlipayPublicKey) // err = client.LoadAliPayPublicKey(c.Alipay.AlipayPublicKey)
if err != nil { // if err != nil {
panic(fmt.Sprintf("加载支付宝公钥失败: %v", err)) // panic(fmt.Sprintf("加载支付宝公钥失败: %v", err))
} // }
// 加载证书 // 加载证书
if err = client.LoadAppCertPublicKeyFromFile(c.Alipay.AppCertPath); err != nil { if err = client.LoadAppCertPublicKeyFromFile(c.Alipay.AppCertPath); err != nil {

View File

@@ -45,20 +45,20 @@ type ServiceContext struct {
QueryCleanupConfigModel model.QueryCleanupConfigModel QueryCleanupConfigModel model.QueryCleanupConfigModel
// 代理相关模型 // 代理相关模型
AgentModel model.AgentModel AgentModel model.AgentModel
AgentAuditModel model.AgentAuditModel AgentAuditModel model.AgentAuditModel
AgentCommissionModel model.AgentCommissionModel AgentCommissionModel model.AgentCommissionModel
AgentWalletModel model.AgentWalletModel AgentWalletModel model.AgentWalletModel
AgentLinkModel model.AgentLinkModel AgentLinkModel model.AgentLinkModel
AgentOrderModel model.AgentOrderModel AgentOrderModel model.AgentOrderModel
AgentProductConfigModel model.AgentProductConfigModel AgentProductConfigModel model.AgentProductConfigModel
AgentPlatformDeductionModel model.AgentPlatformDeductionModel AgentPlatformDeductionModel model.AgentPlatformDeductionModel
AgentWithdrawalModel model.AgentWithdrawalModel AgentWithdrawalModel model.AgentWithdrawalModel
AgentRealNameModel model.AgentRealNameModel AgentRealNameModel model.AgentRealNameModel
AgentWithdrawalTaxModel model.AgentWithdrawalTaxModel AgentWithdrawalTaxModel model.AgentWithdrawalTaxModel
AgentWithdrawalTaxExemptionModel model.AgentWithdrawalTaxExemptionModel AgentWithdrawalTaxExemptionModel model.AgentWithdrawalTaxExemptionModel
AgentWalletTransactionModel model.AgentWalletTransactionModel AgentWalletTransactionModel model.AgentWalletTransactionModel
AgentConfigModel model.AgentConfigModel AgentConfigModel model.AgentConfigModel
// 管理后台相关模型 // 管理后台相关模型
AdminApiModel model.AdminApiModel AdminApiModel model.AdminApiModel
@@ -176,7 +176,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
// ============================== 业务服务初始化 ============================== // ============================== 业务服务初始化 ==============================
alipayService := service.NewAliPayService(c) alipayService := service.NewAliPayService(c)
wechatPayService := service.NewWechatPayService(c, userAuthModel, service.InitTypePlatformCert) wechatPayService := service.NewWechatPayService(c, userAuthModel, service.InitTypeWxPayPubKey)
applePayService := service.NewApplePayService(c) applePayService := service.NewApplePayService(c)
authorizationService := service.NewAuthorizationService(c, authorizationDocumentModel) authorizationService := service.NewAuthorizationService(c, authorizationDocumentModel)
apiRequestService := service.NewApiRequestService(c, featureModel, productFeatureModel, tianyuanapi, authorizationService) apiRequestService := service.NewApiRequestService(c, featureModel, productFeatureModel, tianyuanapi, authorizationService)
@@ -234,20 +234,20 @@ func NewServiceContext(c config.Config) *ServiceContext {
QueryCleanupConfigModel: queryCleanupConfigModel, QueryCleanupConfigModel: queryCleanupConfigModel,
// 代理相关模型 // 代理相关模型
AgentModel: agentModel, AgentModel: agentModel,
AgentAuditModel: agentAuditModel, AgentAuditModel: agentAuditModel,
AgentCommissionModel: agentCommissionModel, AgentCommissionModel: agentCommissionModel,
AgentWalletModel: agentWalletModel, AgentWalletModel: agentWalletModel,
AgentLinkModel: agentLinkModel, AgentLinkModel: agentLinkModel,
AgentOrderModel: agentOrderModel, AgentOrderModel: agentOrderModel,
AgentProductConfigModel: agentProductConfigModel, AgentProductConfigModel: agentProductConfigModel,
AgentPlatformDeductionModel: agentPlatformDeductionModel, AgentPlatformDeductionModel: agentPlatformDeductionModel,
AgentWithdrawalModel: agentWithdrawalModel, AgentWithdrawalModel: agentWithdrawalModel,
AgentRealNameModel: agentRealNameModel, AgentRealNameModel: agentRealNameModel,
AgentWithdrawalTaxModel: agentWithdrawalTaxModel, AgentWithdrawalTaxModel: agentWithdrawalTaxModel,
AgentWithdrawalTaxExemptionModel: agentWithdrawalTaxExemptionModel, AgentWithdrawalTaxExemptionModel: agentWithdrawalTaxExemptionModel,
AgentWalletTransactionModel: agentWalletTransactionModel, AgentWalletTransactionModel: agentWalletTransactionModel,
AgentConfigModel: agentConfigModel, AgentConfigModel: agentConfigModel,
// 管理后台相关模型 // 管理后台相关模型
AdminApiModel: adminApiModel, AdminApiModel: adminApiModel,