diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index d9041617..30355e8a 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -78,6 +78,12 @@ class PayNotifyLogic extends BaseLogic $user->now_money = bcsub($user['now_money'], $order['pay_price'], 2); $user->save(); + if ($order['spread_uid'] > 0 && $user['user_ship'] == 1) { + $oldUser = User::where('id',$order['spread_uid'])->value('purchase_funds'); + if ($oldUser < $order['pay_price']) { + $order['pay_price'] = $oldUser; + } + } $capitalFlowDao = new CapitalFlowLogic($user); $capitalFlowDao->userExpense('user_order_pay', 'order', $order['id'], $order['pay_price'],'',0,$order['store_id']); // self::afterPay($order);