6
0
Fork 0

调整砍价下单计算优惠

release
vine_liutk 2022-04-14 13:30:51 +08:00
parent 7379446690
commit bbabc71f82
1 changed files with 3 additions and 0 deletions

View File

@ -863,9 +863,12 @@ class OrderService
foreach ($amounts as &$amount) {
$i--;
$originalAmount = $amount;
if ($i > 0) {
$amount = (int) bcdiv(bcmul($bargainAmount, $amount, 0), $totalAmount, 2);
$bargainAmount -= $amount;
$totalAmount -= $originalAmount;
} else {
$amount = $bargainAmount;
}