From 355b18900e591353d6e648819e544943921fda06 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 29 Jun 2024 15:41:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=93=B6=E5=8F=B0=E7=8E=B0=E9=87=91?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E7=9B=B4=E6=8E=A5=E5=8A=A0=E8=A7=A3=E5=86=BB?= =?UTF-8?q?=E7=A4=BC=E5=93=81=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/PayNotifyLogic.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index e5852bd60..b59545a3c 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -756,7 +756,25 @@ class PayNotifyLogic extends BaseLogic self::dealProductLog($order); if ($order['shipping_type'] == 3) { self::descStock($order['id']); + //直接加到礼品券中 + $user_sing = new UserSign(); + $total_vip = bcmul($order['price'], 0.1, 2); + $sing[] = [ + 'uid' => $order['uid'], + 'order_id' => $order['order_id'], + 'title' => 8, + 'financial_pm' => 1, + 'store_id' => $order['store_id'], + 'type' => 1, + 'status' => 1, + 'number' => $total_vip, + 'back_num' => $total_vip, + ]; + $user_sing->saveAll($sing); + User::where('id', $order->uid)->inc('integral', $total_vip)->update(); } + + // Redis::send('push-platform-print', ['id' => $order['id']]); return true; } @@ -1129,6 +1147,8 @@ class PayNotifyLogic extends BaseLogic return "兑换{$amount}元商品扣除礼品卷"; case 6: return "退款{$amount}元扣除礼品卷"; + case 8: + return "收银台支付{$amount}元增加礼品卷"; default: return "订单支付{$amount}元"; }