fix(reward-service): 修复 targetType 类型断言
This commit is contained in:
parent
96f031da35
commit
e557b00c24
|
|
@ -56,8 +56,8 @@ export class RewardApplicationService {
|
|||
|
||||
// 2. 调用 wallet-service 执行真正的资金分配
|
||||
// 字段映射:targetType=USER/SYSTEM, targetId=accountSequence, allocationType=rightType
|
||||
const allocations = rewards.map(reward => ({
|
||||
targetType: reward.accountSequence.startsWith('S') ? 'SYSTEM' : 'USER',
|
||||
const allocations: import('../../infrastructure/external/wallet-service/wallet-service.client').FundAllocationItem[] = rewards.map(reward => ({
|
||||
targetType: (reward.accountSequence.startsWith('S') ? 'SYSTEM' : 'USER') as 'USER' | 'SYSTEM',
|
||||
targetId: reward.accountSequence, // 使用 accountSequence 而不是 userId
|
||||
allocationType: reward.rewardSource.rightType,
|
||||
amount: reward.usdtAmount.amount,
|
||||
|
|
|
|||
Loading…
Reference in New Issue