fix: 修复 golangci-lint depguard 和 gofmt 错误

将 redis leader lock 逻辑从 service 层抽取为 LeaderLocker 接口,
实现移至 repository 层,消除 service 层对 redis 的直接依赖。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
guoyongchang
2026-03-05 16:28:48 +08:00
parent 8adf80d98b
commit 9a8dacc514
6 changed files with 115 additions and 70 deletions

View File

@@ -53,9 +53,10 @@ var ProviderSet = wire.NewSet(
NewAPIKeyRepository,
NewGroupRepository,
NewAccountRepository,
NewSoraAccountRepository, // Sora 账号扩展表仓储
NewScheduledTestPlanRepository, // 定时测试计划仓储
NewScheduledTestResultRepository, // 定时测试结果仓储
NewSoraAccountRepository, // Sora 账号扩展表仓储
NewScheduledTestPlanRepository, // 定时测试计划仓储
NewScheduledTestResultRepository, // 定时测试结果仓储
NewLeaderLocker, // 分布式 leader 选举
NewProxyRepository,
NewRedeemCodeRepository,
NewPromoCodeRepository,