From 81ea35b712d06fd7c572f3c06e86bc3dc4bde364 Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 26 Feb 2026 10:48:07 -0800 Subject: [PATCH] =?UTF-8?q?fix(admin-service):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=A2=84=E7=A7=8D=E4=BB=B7=E6=A0=BC=E8=AE=A1=E7=AE=97=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C3566=E4=B8=8D=E6=98=AF15831/5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../admin-service/src/pricing/tree-pricing.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/services/admin-service/src/pricing/tree-pricing.service.ts b/backend/services/admin-service/src/pricing/tree-pricing.service.ts index 1680533f..5a4b22bb 100644 --- a/backend/services/admin-service/src/pricing/tree-pricing.service.ts +++ b/backend/services/admin-service/src/pricing/tree-pricing.service.ts @@ -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,