支持微信支付宝独立支付渠道

This commit is contained in:
yml
2026-06-14 23:38:03 +08:00
parent 2dc5a8121e
commit 3ff8c1de88
27 changed files with 550 additions and 97 deletions
@@ -64,7 +64,7 @@ func (s *Service) Delete(ctx context.Context, id uint64, actorID uint64, meta Au
return s.repo.Delete(ctx, id, actorID, meta)
}
// GetDefaultConfig 获取默认配置(用于支付模块调用)
// GetDefaultConfig 获取指定服务商的默认配置,保留给管理工具或兼容调用使用。
func (s *Service) GetDefaultConfig(ctx context.Context, provider string) (*ConfigDTO, error) {
config, err := s.repo.FindDefault(ctx, provider)
if err != nil {
@@ -76,3 +76,8 @@ func (s *Service) GetDefaultConfig(ctx context.Context, provider string) (*Confi
}
return &dto, nil
}
// GetDefaultConfigByPayWay 获取指定支付方式的默认配置,供新支付链路按微信/支付宝选渠道。
func (s *Service) GetDefaultConfigByPayWay(ctx context.Context, payWay string) (*ConfigDTO, error) {
return s.repo.FindDefaultByPayWay(ctx, payWay, true)
}