|
|
@@ -184,6 +184,10 @@ class RechargeClass extends BaseClass
|
|
|
if (!$hasOver) {
|
|
|
$lastClearOrderAmount = bcsub($getBalance, $lastRemainDebtAmount, 2);
|
|
|
if ($lastClearOrderAmount > 0) {
|
|
|
+ //清除欠款
|
|
|
+ $order->remainDebtPrice = bcsub($order->remainDebtPrice, $lastClearOrderAmount, 2);
|
|
|
+ $order->save();
|
|
|
+ //记录清除欠款的订单id和编号
|
|
|
$lastClearOrderId = $orderId;
|
|
|
$lastClearOrderNo = $order->orderSn ?? '';
|
|
|
}
|