|
|
|
|
@ -1559,13 +1559,13 @@ class OrdersController extends CommonController
|
|
|
|
|
->get();
|
|
|
|
|
|
|
|
|
|
// 2. 计算支付总额
|
|
|
|
|
$totalPaid = $recharges->sum('money');
|
|
|
|
|
$totalPaid = (float)$recharges->sum('money');
|
|
|
|
|
|
|
|
|
|
// 3. 获取用户当前余额
|
|
|
|
|
$customer = $order->customer;
|
|
|
|
|
$currentBalance = $customer->balance;
|
|
|
|
|
$currentBalance = (float)$customer->balance;
|
|
|
|
|
|
|
|
|
|
dd(floatval($totalPaid),floatval($currentBalance), floatval($totalPaid) == floatval($currentBalance));
|
|
|
|
|
dd($totalPaid == $currentBalance);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 4. 如果支付总额等于用户余额,进行退款处理
|
|
|
|
|
|