From 01f0dab6de2fcd4ecf63dff3ff9e1422f1f5ca53 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 29 Jun 2024 16:13:34 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=95=99=E4=BD=99=E9=A2=9D=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=85=91=E6=8D=A2=E5=88=B8=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/PayNotifyLogic.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index b7edff3d2..67bccf421 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -94,9 +94,15 @@ class PayNotifyLogic extends BaseLogic $capitalFlowDao = new CapitalFlowLogic($user); $capitalFlowDao->userExpense('user_order_balance_pay', 'order', $order['id'], $order['pay_price'], '', 0, $order['store_id']); self::dealProductLog($order); - // if ($order['shipping_type'] == 3) { - // self::descStock($order['id']); - // } + if ($order['shipping_type'] == 3) { + //预留收银台余额支付得兑换券逻辑 + if ($order->uid >0) { + $total_vip = bcmul($order['pay_price'], 0.1, 2); + self::addNewUserSing($order,8,$total_vip,1,1); + User::where('id', $order->uid)->inc('integral', $total_vip)->update(); + } +// self::descStock($order['id']); + } self::afterPay($order); if ($extra && $extra['store_id']) { $params = [