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>
This commit is contained in:
parent
3a307b5db7
commit
81ea35b712
|
|
@ -52,12 +52,15 @@ export class TreePricingService {
|
|||
}
|
||||
|
||||
const totalPrice = BASE_PRICE + config.currentSupplement;
|
||||
// 预种价格 = 基础预种价(3566) + floor(加价部分/5)
|
||||
// 注意:3566 不是 15831/5,而是各权益项 floor(amount/5) 之和 + 总部吸收余额
|
||||
const totalPortionPrice = BASE_PORTION_PRICE + Math.floor(config.currentSupplement / 5);
|
||||
return {
|
||||
basePrice: BASE_PRICE,
|
||||
basePortionPrice: BASE_PORTION_PRICE,
|
||||
currentSupplement: config.currentSupplement,
|
||||
totalPrice,
|
||||
totalPortionPrice: Math.floor(totalPrice / 5),
|
||||
totalPortionPrice,
|
||||
autoIncreaseEnabled: config.autoIncreaseEnabled,
|
||||
autoIncreaseAmount: config.autoIncreaseAmount,
|
||||
autoIncreaseIntervalDays: config.autoIncreaseIntervalDays,
|
||||
|
|
|
|||
Loading…
Reference in New Issue