hailin
|
d7f7d7082d
|
fix(pricing): 预种定价API常量同步 — 3566→1887, /5→/10, 正式认种15831不变
admin-service tree-pricing.service.ts:
- BASE_PORTION_PRICE: 3566 → 1887
- supplement 除数: /5 → /PORTIONS_PER_TREE(10)
- BASE_PRICE 保持 15831(正式认种价格不变)
- 移除 updateSupplement 中重复声明的 BASE_PRICE 局部变量
planting-service tree-pricing-admin.client.ts:
- fallback basePortionPrice/totalPortionPrice: 3566 → 1887
mobile-app tree_pricing_service.dart:
- 修正上次commit误改的 basePrice/totalPrice fallback: 18870 → 15831
- basePortionPrice/totalPortionPrice 保持 1887
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-03 01:56:21 -08:00 |
hailin
|
cfc03fe523
|
fix(pricing): 手动调价支持负数降价对冲
之前手动调价只允许非负整数,无法用负数对冲降价。
前端 (admin-web settings/page.tsx):
- 移除 input min="0" 限制,允许输入负数
- 验证改为:只校验 isNaN 和总价不低于 0(15831 + amount >= 0)
- 文案:"加价金额" → "调价金额",placeholder 改为"正数涨价,负数降价"
- 实时预览条件从 amount >= 0 改为总价 >= 0
- 提示文案更新为"正数涨价,负数降价对冲"
后端 (admin-service tree-pricing.service.ts):
- 移除 newSupplement < 0 的硬性拒绝
- 改为校验 BASE_PRICE(15831) + newSupplement >= 0,防止总价为负
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-26 11:58:11 -08:00 |
hailin
|
81ea35b712
|
fix(admin-service): 修复预种价格计算公式,3566不是15831/5
totalPortionPrice 之前用 Math.floor(totalPrice/5) = 3166,但预种
价格 3566 是各权益项 floor(amount/5) 之和 + 总部吸收余额,不是
简单的整棵价格除以5。
修正为: BASE_PORTION_PRICE(3566) + floor(currentSupplement/5)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-26 10:48:07 -08:00 |
hailin
|
acf55b26a7
|
feat(pricing): 预种每份价格从 3171 调整为 3566 绿积分
分配规则:按 reward-service RIGHT_AMOUNTS(15831 整棵树)各项 /5 取整,
余额全归总部社区(HQ_BASE_FEE)。5 份合成一棵树 = 17830。
10 类分配金额变更:
- COST_FEE: 576 (不变, floor(2880/5))
- OPERATION_FEE: 420 (不变, floor(2100/5))
- HQ_BASE_FEE: 29.4 → 427 (3566 - 3139, 吸收全部余额)
- RWAD_POOL: 1152 (不变, floor(5760/5))
- SHARE_RIGHT: 720 (不变, floor(3600/5))
- PROVINCE_AREA: 21.6 → 21 (floor(108/5))
- PROVINCE_TEAM: 28.8 → 28 (floor(144/5))
- CITY_AREA: 50.4 → 50 (floor(252/5))
- CITY_TEAM: 57.6 → 57 (floor(288/5))
- COMMUNITY: 115.2 → 115 (floor(576/5))
- 合计: 3171 → 3566 ✓
涉及服务:planting-service, admin-service, contribution-service
涉及前端:admin-web, mobile-app (Flutter)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-26 08:02:17 -08:00 |
hailin
|
ed6b48562a
|
feat(pricing): 认种树动态定价涨价系统(总部运营成本压力涨价)
基础价 15831 USDT/棵不变,新增 HQ_PRICE_SUPPLEMENT 加价项全额归总部(S0000000001)。
支持手动调价+自动周期涨价,所有变更可审计,移动端动态展示价格及涨价预告。
- admin-service: TreePricingConfig/ChangeLog 表 + Service + Controller + 定时任务
- planting-service: 正式认种和预种订单快照 priceSupplement,动态价格校验
- reward-service: HQ_PRICE_SUPPLEMENT 分配类型,涨价金额直接入总部账户
- admin-web: Settings 页面新增定价配置区间(手动调价/自动涨价/变更历史)
- mobile-app: TreePricingService + 动态价格加载 + 涨价预告展示
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-26 03:02:56 -08:00 |