Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
54bb838ab6
@ -66,7 +66,6 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
public static function balancePay($orderSn, $extra = [])
|
public static function balancePay($orderSn, $extra = [])
|
||||||
{
|
{
|
||||||
$order = StoreOrder::where('order_id', $orderSn)->findOrEmpty();
|
$order = StoreOrder::where('order_id', $orderSn)->findOrEmpty();
|
||||||
self::afterPay($order);
|
|
||||||
$user = User::where('id', $order['uid'])->find();
|
$user = User::where('id', $order['uid'])->find();
|
||||||
if ($user['now_money'] < $order['pay_price']) {
|
if ($user['now_money'] < $order['pay_price']) {
|
||||||
throw new \Exception('余额不足');
|
throw new \Exception('余额不足');
|
||||||
@ -219,9 +218,10 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
// if($count){
|
// if($count){
|
||||||
// self::addFlowLog($order);
|
// self::addFlowLog($order);
|
||||||
// }
|
// }
|
||||||
// if($order['shipping_type'] == 3){
|
//收银台下单直接到账
|
||||||
|
// if($order['shipping_type'] == 3){
|
||||||
// self::descStock($order['id']);
|
// self::descStock($order['id']);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// Redis::send('push-platform-print', ['id' => $order['id']], 60);
|
// Redis::send('push-platform-print', ['id' => $order['id']], 60);
|
||||||
@ -756,7 +756,25 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
self::dealProductLog($order);
|
self::dealProductLog($order);
|
||||||
if ($order['shipping_type'] == 3) {
|
if ($order['shipping_type'] == 3) {
|
||||||
self::descStock($order['id']);
|
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']]);
|
// Redis::send('push-platform-print', ['id' => $order['id']]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1151,6 +1169,8 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
return "兑换{$amount}元商品扣除礼品卷";
|
return "兑换{$amount}元商品扣除礼品卷";
|
||||||
case 6:
|
case 6:
|
||||||
return "退款{$amount}元扣除礼品卷";
|
return "退款{$amount}元扣除礼品卷";
|
||||||
|
case 8:
|
||||||
|
return "收银台支付{$amount}元增加礼品卷";
|
||||||
default:
|
default:
|
||||||
return "订单支付{$amount}元";
|
return "订单支付{$amount}元";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user