hailin
|
e32658fc5e
|
fix(pre-planting): 修复 authorization-service 响应包装格式解析
authorization-service 全局 TransformInterceptor 将响应包装为
{ success, data: T, timestamp },预种客户端需读取 response.data.data
而非 response.data。此前因解析失败静默 fallback 到系统账户。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-01 02:22:01 -08:00 |
hailin
|
d880242807
|
fix(pre-planting): 修复 authorization-service API 路径错误
预种 client 使用 /internal/authorization/... 但 authorization-service
全局前缀为 api/v1,实际路由是 /api/v1/authorization/...。
路径不对导致所有请求 404 → catch → fallback → 全部进系统账户。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-01 02:04:09 -08:00 |
hailin
|
b9ddda2532
|
fix(pre-planting): 修复省市代码格式不一致导致授权分配失败
预种DTO接收2位省代码(如"44")和4位市代码(如"4401"),
但authorization-service需要6位标准格式(如"440000"/"440100")。
- resolveAllocations中新增padEnd(6,'0')标准化转换
- fallback系统账户生成从padStart改为padEnd(右补零)
- 正常认种不受影响(SelectProvinceCityDto直接接收6位格式)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-01 01:23:55 -08:00 |
hailin
|
545e897c1f
|
fix(pre-planting): 预种省/市区域 API 传 treeCount=0,不计入考核
预种 1 份 = 1/5 棵树,如果将 portionCount 作为 treeCount 传给
authorization-service,会导致省/市公司月度考核进度被多算 5 倍。
修正:传 treeCount=0,预种阶段不累计考核棵数。
等 5 份合成 1 棵完整树后,由合成流程负责累计 1 棵的考核进度。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-28 20:57:27 -08:00 |
hailin
|
1c71cda2ec
|
fix(pre-planting): 修复省/市区域权益分配的三个 bug
问题:
1. 省/市区域 API 调用缺少必需的 treeCount 参数,导致 authorization-service
报错,每次都走 fallback 路径
2. fallback 路径没有对省/市代码做 padStart(6,'0') 补位,
生成了错误的账户ID(如 944 而非 9440000,84401 而非 8440100)
3. API 返回格式解析错误:authorization-service 返回
{ distributions: [{accountSequence, ...}] },但预种客户端错误地期望
{ accountSequence: string },导致取到 undefined
修复:
- getProvinceAreaDistribution / getCityAreaDistribution 新增 portionCount 参数
- 正确解析 distributions 数组,优先取非系统账户(省/市公司)
- fallback 中使用 padStart(6,'0') 确保 7 位标准账户 ID 格式
- resolveAllocations 调用时传入 portionCount
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-28 20:53:12 -08:00 |
hailin
|
010b0392fd
|
feat(pre-planting): 3171 预种计划 1.0 全量实现(纯新增,零侵入)
预种计划(拼种团购):用户以 3171 USDT/份参与认种(1棵树的1/5价格),
累计5份自动合成1棵树,触发合同签署并解除交易/提现限制。
涉及服务(现有代码仅 app.module.ts 加 1 行 import,其余全部为新增文件):
- planting-service: PrePlantingModule(独立聚合根、购买/合并/签约/分配)
- admin-service: 预种开关管理(PrePlantingConfig 表 + API)
- referral-service: PrePlantingStatsModule(消费预种事件更新团队统计)
- authorization-service: PrePlantingGuardModule(未合并不可申请授权)
- wallet-service: PrePlantingGuardModule(未合并不可提现)
新增数据表:pre_planting_orders, pre_planting_positions,
pre_planting_merges, pre_planting_reward_entries, pre_planting_configs
新增 Kafka Topics:pre-planting.portion.purchased, pre-planting.merged,
pre-planting.contract.signed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-18 05:06:03 -08:00 |