mirror of
https://github.com/v2board/v2board.git
synced 2025-01-26 16:09:09 +08:00
update: optimize commission calculation
This commit is contained in:
parent
03846022ef
commit
8a18bdf9c3
@ -93,6 +93,7 @@ class CheckCommission extends Command
|
|||||||
0 => 100
|
0 => 100
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
$actualPayCommissionAmount = 0;
|
||||||
for ($l = 0; $l < $level; $l++) {
|
for ($l = 0; $l < $level; $l++) {
|
||||||
$inviter = User::find($inviteUserId);
|
$inviter = User::find($inviteUserId);
|
||||||
if (!$inviter) continue;
|
if (!$inviter) continue;
|
||||||
@ -118,7 +119,10 @@ class CheckCommission extends Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$inviteUserId = $inviter->invite_user_id;
|
$inviteUserId = $inviter->invite_user_id;
|
||||||
|
$actualPayCommissionAmount = $actualPayCommissionAmount + $commissionBalance;
|
||||||
}
|
}
|
||||||
|
// update order commission balance
|
||||||
|
$order->commission_balance = $actualPayCommissionAmount;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
public/assets/admin/umi.js
vendored
2
public/assets/admin/umi.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user