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}元"; }