fix(reward-service): 权益分配memo显示触发用户ID

所有权益类型的memo现在统一显示"来自用户xxx的认种"格式:
- 省团队权益:来自用户xxx的认种
- 省区域权益:来自用户xxx的认种
- 市团队权益:来自用户xxx的认种
- 市区域权益:来自用户xxx的认种
- 社区权益:来自用户xxx的认种

修改前只显示"xx权益已激活",现在与分享权益格式保持一致

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-26 04:18:35 -08:00
parent f711d54eed
commit 3d42c3602d
2 changed files with 11 additions and 6 deletions

View File

@ -425,7 +425,8 @@
"Bash(git commit -m \"$\\(cat <<''EOF''\nfix\\(mobile-app\\): 遍历路由栈检测当前页面修复push导航检测问题\n\n之前只检查 currentConfiguration.uri.path对于 push 导航的页面无法正确检测。\n现在遍历整个 matches 路由栈,只要栈中有合同/KYC页面就跳过弹窗。\n\n🤖 Generated with [Claude Code]\\(https://claude.com/claude-code\\)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
"Bash(git commit -m \"$\\(cat <<''EOF''\nfix\\(planting-service\\): 修复跨服务调用使用错误标识符导致的500错误\n\n问题根源\n- getBalance 调用使用 userId.toString\\(\\) \\(纯数字如 \"14\"\\)\n- wallet-service 按 accountSequence 查找钱包失败后尝试创建新钱包\n- 但 userId 已存在触发唯一约束冲突导致500错误\n\n修复内容\n1. planting-application.service.ts:\n - createOrder: getBalance\\(userId.toString\\(\\)\\) → getBalance\\(accountSequence\\)\n - payOrder: getBalance\\(userId.toString\\(\\)\\) → getBalance\\(walletIdentifier\\)\n\n2. payment-compensation.service.ts:\n - 注入 IPlantingOrderRepository 获取订单的 accountSequence\n - handleUnfreeze/handleRetryConfirm 添加 accountSequence 参数\n\n3. wallet-service.client.ts:\n - ensureRegionAccounts 接口添加 provinceTeamAccount/cityTeamAccount 字段\n\n🤖 Generated with [Claude Code]\\(https://claude.com/claude-code\\)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
"Bash(git commit -m \"$\\(cat <<''EOF''\nfeat\\(mobile-app\\): 流水明细支持显示权益类型和详情\n\n- 后端 wallet-service: getMyLedger API 返回 allocationType 字段\n- 前端流水明细: 显示权益类型名称(分享权益、省/市区域权益等)\n- 新增权益详情弹窗,点击权益记录可查看详细信息\n- 兑换页面: \"RMB/CNY提现\" 改为 \"提现\"\n- 我的团队: \"暂无下级成员\" 改为 \"暂无团队成员\"\n- 自助申请授权: 隐藏团队链占用区域提示\n\n🤖 Generated with [Claude Code]\\(https://claude.com/claude-code\\)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
"Bash(dir /b \"c:\\\\Users\\\\dong\\\\Desktop\\\\rwadurian\")"
"Bash(dir /b \"c:\\\\Users\\\\dong\\\\Desktop\\\\rwadurian\")",
"Bash(git commit -m \"$\\(cat <<''EOF''\nfix\\(reward-service\\): 权益分配memo显示触发用户ID\n\n所有权益类型的memo现在统一显示\"来自用户xxx的认种\"格式:\n- 省团队权益来自用户xxx的认种\n- 省区域权益来自用户xxx的认种\n- 市团队权益来自用户xxx的认种\n- 市区域权益来自用户xxx的认种\n- 社区权益来自用户xxx的认种\n\n修改前只显示\"xx权益已激活\",现在与分享权益格式保持一致\n\n🤖 Generated with [Claude Code]\\(https://claude.com/claude-code\\)\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")"
],
"deny": [],
"ask": []

View File

@ -165,6 +165,7 @@ export class RewardCalculationService {
const provinceAreaRewards = await this.calculateProvinceAreaRight(
params.sourceOrderNo,
params.sourceUserId,
params.sourceAccountSequence!,
params.provinceCode,
params.treeCount,
);
@ -184,6 +185,7 @@ export class RewardCalculationService {
const cityAreaRewards = await this.calculateCityAreaRight(
params.sourceOrderNo,
params.sourceUserId,
params.sourceAccountSequence!,
params.cityCode,
params.treeCount,
);
@ -447,7 +449,7 @@ export class RewardCalculationService {
rewardSource,
usdtAmount: itemUsdtAmount,
hashpowerAmount: itemHashpower,
memo: `省团队权益(${provinceCode})${item.reason}`,
memo: `省团队权益(${provinceCode})来自用户${sourceAccountSequence}的认种`,
}),
);
}
@ -464,6 +466,7 @@ export class RewardCalculationService {
private async calculateProvinceAreaRight(
sourceOrderNo: string,
sourceUserId: bigint,
sourceAccountSequence: string,
provinceCode: string,
treeCount: number,
): Promise<RewardLedgerEntry[]> {
@ -503,7 +506,7 @@ export class RewardCalculationService {
rewardSource,
usdtAmount: itemUsdtAmount,
hashpowerAmount: itemHashpower,
memo: `省区域权益(${provinceCode})${item.reason}`,
memo: `省区域权益(${provinceCode})来自用户${sourceAccountSequence}的认种`,
}),
);
}
@ -559,7 +562,7 @@ export class RewardCalculationService {
rewardSource,
usdtAmount: itemUsdtAmount,
hashpowerAmount: itemHashpower,
memo: `市团队权益(${cityCode})${item.reason}`,
memo: `市团队权益(${cityCode})来自用户${sourceAccountSequence}的认种`,
}),
);
}
@ -576,6 +579,7 @@ export class RewardCalculationService {
private async calculateCityAreaRight(
sourceOrderNo: string,
sourceUserId: bigint,
sourceAccountSequence: string,
cityCode: string,
treeCount: number,
): Promise<RewardLedgerEntry[]> {
@ -615,7 +619,7 @@ export class RewardCalculationService {
rewardSource,
usdtAmount: itemUsdtAmount,
hashpowerAmount: itemHashpower,
memo: `市区域权益(${cityCode})${item.reason}`,
memo: `市区域权益(${cityCode})来自用户${sourceAccountSequence}的认种`,
}),
);
}
@ -671,7 +675,7 @@ export class RewardCalculationService {
rewardSource,
usdtAmount: itemUsdtAmount,
hashpowerAmount: itemHashpower,
memo: `社区权益:${item.reason}`,
memo: `社区权益:来自用户${sourceAccountSequence}的认种`,
}),
);
}