fix(hjf): 级差下限仅在节点有资格直推奖时更新

创客在 depth>0 被跳过时不应把其直推额并入 nextLower,
否则上级级差被多扣(问题4:云店 uid=2 应得 800 却只得 300)。
文档:问题3 标记已修复,补充问题4 记录。

Made-with: Cursor
This commit is contained in:
apple
2026-04-06 01:22:39 +08:00
parent d94fea8215
commit fb89fbbacb
2 changed files with 15 additions and 5 deletions

View File

@@ -165,8 +165,12 @@ class PointsRewardServices extends BaseServices
}
}
// 级差下限始终更新(不论本节点是否获奖),保证上级只拿增量差额
$nextLower = max($directReward, $lowerDirectReward);
// 级差下限仅在本节点实际有资格获奖时才更新:
// 若节点被跳过(创客在 depth>0其 directReward 不应计入下限,
// 否则上级会被扣减一笔从未发出的积分fsgx 问题4
$nextLower = $isEligibleForDirect
? max($directReward, $lowerDirectReward)
: $lowerDirectReward;
if ($user['spread_uid']) {
$this->propagateReward(
(int)$user['spread_uid'],