diff --git a/pkg/constants/wallet.go b/pkg/constants/wallet.go index 55831df..5f007ac 100644 --- a/pkg/constants/wallet.go +++ b/pkg/constants/wallet.go @@ -130,18 +130,18 @@ func RedisAgentWalletLockKey(shopID uint, walletType string) string { return fmt.Sprintf("agent_wallet:lock:%d:%s", shopID, walletType) } -// RedisCardWalletBalanceKey 卡钱包余额缓存 Key -// 格式:card_wallet:balance:{resource_type}:{resource_id} +// RedisAssetWalletBalanceKey 资产钱包余额缓存 Key +// 格式:asset_wallet:balance:{resource_type}:{resource_id} // TTL:180 秒(3 分钟) -func RedisCardWalletBalanceKey(resourceType string, resourceID uint) string { - return fmt.Sprintf("card_wallet:balance:%s:%d", resourceType, resourceID) +func RedisAssetWalletBalanceKey(resourceType string, resourceID uint) string { + return fmt.Sprintf("asset_wallet:balance:%s:%d", resourceType, resourceID) } -// RedisCardWalletLockKey 卡钱包分布式锁 Key -// 格式:card_wallet:lock:{resource_type}:{resource_id} +// RedisAssetWalletLockKey 资产钱包分布式锁 Key +// 格式:asset_wallet:lock:{resource_type}:{resource_id} // TTL:10 秒 -func RedisCardWalletLockKey(resourceType string, resourceID uint) string { - return fmt.Sprintf("card_wallet:lock:%s:%d", resourceType, resourceID) +func RedisAssetWalletLockKey(resourceType string, resourceID uint) string { + return fmt.Sprintf("asset_wallet:lock:%s:%d", resourceType, resourceID) } // ========== 兼容性别名(待清理)========== diff --git a/pkg/queue/types.go b/pkg/queue/types.go index 29cbb8b..ef39005 100644 --- a/pkg/queue/types.go +++ b/pkg/queue/types.go @@ -39,10 +39,9 @@ type WorkerStores struct { PollingAlertHistory *postgres.PollingAlertHistoryStore DataCleanupConfig *postgres.DataCleanupConfigStore DataCleanupLog *postgres.DataCleanupLogStore - // 新增代理钱包 Store - AgentWallet *postgres.AgentWalletStore - AgentWalletTransaction *postgres.AgentWalletTransactionStore - CardWallet *postgres.CardWalletStore // 卡钱包 Store(用于订单取消时解冻) + AgentWallet *postgres.AgentWalletStore + AgentWalletTransaction *postgres.AgentWalletTransactionStore + AssetWallet *postgres.AssetWalletStore } // WorkerServices Worker 侧所有 Service 的集合