fix(hjf): 级差下限仅在节点有资格直推奖时更新
创客在 depth>0 被跳过时不应把其直推额并入 nextLower, 否则上级级差被多扣(问题4:云店 uid=2 应得 800 却只得 300)。 文档:问题3 标记已修复,补充问题4 记录。 Made-with: Cursor
This commit is contained in:
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user