chore(bootstrap): 更新依赖注入和 API 文档
- Bootstrap 注册 RechargeHandler 和 RechargeService - Bootstrap 注册 RechargeStore 数据访问层 - 更新 PaymentCallback 依赖注入(添加 RechargeService) - 更新 OpenAPI 文档生成器注册充值接口 - 同步 admin-openapi.yaml 文档(新增充值和代购预检接口)
This commit is contained in:
@@ -45,6 +45,7 @@ func initHandlers(svc *services, deps *Dependencies) *Handlers {
|
||||
ShopPackageBatchPricing: admin.NewShopPackageBatchPricingHandler(svc.ShopPackageBatchPricing),
|
||||
AdminOrder: admin.NewOrderHandler(svc.Order),
|
||||
H5Order: h5.NewOrderHandler(svc.Order),
|
||||
PaymentCallback: callback.NewPaymentHandler(svc.Order, deps.WechatPayment),
|
||||
H5Recharge: h5.NewRechargeHandler(svc.Recharge),
|
||||
PaymentCallback: callback.NewPaymentHandler(svc.Order, svc.Recharge, deps.WechatPayment),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
permissionSvc "github.com/break/junhong_cmp_fiber/internal/service/permission"
|
||||
personalCustomerSvc "github.com/break/junhong_cmp_fiber/internal/service/personal_customer"
|
||||
purchaseValidationSvc "github.com/break/junhong_cmp_fiber/internal/service/purchase_validation"
|
||||
rechargeSvc "github.com/break/junhong_cmp_fiber/internal/service/recharge"
|
||||
roleSvc "github.com/break/junhong_cmp_fiber/internal/service/role"
|
||||
shopSvc "github.com/break/junhong_cmp_fiber/internal/service/shop"
|
||||
shopAccountSvc "github.com/break/junhong_cmp_fiber/internal/service/shop_account"
|
||||
@@ -67,6 +68,7 @@ type services struct {
|
||||
CommissionStats *commissionStatsSvc.Service
|
||||
PurchaseValidation *purchaseValidationSvc.Service
|
||||
Order *orderSvc.Service
|
||||
Recharge *rechargeSvc.Service
|
||||
}
|
||||
|
||||
func initServices(s *stores, deps *Dependencies) *services {
|
||||
@@ -120,5 +122,6 @@ func initServices(s *stores, deps *Dependencies) *services {
|
||||
CommissionStats: commissionStatsSvc.New(s.ShopSeriesCommissionStats),
|
||||
PurchaseValidation: purchaseValidation,
|
||||
Order: orderSvc.New(deps.DB, s.Order, s.OrderItem, s.Wallet, purchaseValidation, s.ShopSeriesAllocationConfig, s.ShopSeriesAllocation, s.IotCard, s.Device, deps.WechatPayment, deps.QueueClient, deps.Logger),
|
||||
Recharge: rechargeSvc.New(deps.DB, s.Recharge, s.Wallet, s.WalletTransaction, s.IotCard, s.Device, s.ShopSeriesAllocation, s.CommissionRecord, deps.Logger),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ type stores struct {
|
||||
ShopSeriesCommissionStats *postgres.ShopSeriesCommissionStatsStore
|
||||
Order *postgres.OrderStore
|
||||
OrderItem *postgres.OrderItemStore
|
||||
Recharge *postgres.RechargeStore
|
||||
}
|
||||
|
||||
func initStores(deps *Dependencies) *stores {
|
||||
@@ -75,5 +76,6 @@ func initStores(deps *Dependencies) *stores {
|
||||
ShopSeriesCommissionStats: postgres.NewShopSeriesCommissionStatsStore(deps.DB),
|
||||
Order: postgres.NewOrderStore(deps.DB, deps.Redis),
|
||||
OrderItem: postgres.NewOrderItemStore(deps.DB, deps.Redis),
|
||||
Recharge: postgres.NewRechargeStore(deps.DB, deps.Redis),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ type Handlers struct {
|
||||
ShopPackageBatchPricing *admin.ShopPackageBatchPricingHandler
|
||||
AdminOrder *admin.OrderHandler
|
||||
H5Order *h5.OrderHandler
|
||||
H5Recharge *h5.RechargeHandler
|
||||
PaymentCallback *callback.PaymentHandler
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user