This commit is contained in:
mkm 2024-06-29 15:52:19 +08:00
commit 54bb838ab6

View File

@ -66,7 +66,6 @@ class PayNotifyLogic extends BaseLogic
public static function balancePay($orderSn, $extra = [])
{
$order = StoreOrder::where('order_id', $orderSn)->findOrEmpty();
self::afterPay($order);
$user = User::where('id', $order['uid'])->find();
if ($user['now_money'] < $order['pay_price']) {
throw new \Exception('余额不足');
@ -219,9 +218,10 @@ class PayNotifyLogic extends BaseLogic
// if($count){
// self::addFlowLog($order);
// }
// if($order['shipping_type'] == 3){
//收银台下单直接到账
// if($order['shipping_type'] == 3){
// self::descStock($order['id']);
// }
// }
// Redis::send('push-platform-print', ['id' => $order['id']], 60);
@ -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;
}
@ -1151,6 +1169,8 @@ class PayNotifyLogic extends BaseLogic
return "兑换{$amount}元商品扣除礼品卷";
case 6:
return "退款{$amount}元扣除礼品卷";
case 8:
return "收银台支付{$amount}元增加礼品卷";
default:
return "订单支付{$amount}";
}