修改余额支付逻辑

This commit is contained in:
liu 2024-06-18 18:38:42 +08:00
parent ea4e67a38f
commit 2e64e57488

View File

@ -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);