线下扫码支付同步采购金额和销售金额
This commit is contained in:
parent
58a03e755e
commit
53856b1c4a
@ -233,6 +233,13 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
$order->pay_time = $time;
|
$order->pay_time = $time;
|
||||||
if ($order->source == 999) {
|
if ($order->source == 999) {
|
||||||
$order->status = 3;
|
$order->status = 3;
|
||||||
|
//订单确认收货,增加商户销售金额
|
||||||
|
Merchant::where('mer_id', $order->mer_id)->update(['sale_amount' => Db::raw('sale_amount+' . $order->pay_price)]);
|
||||||
|
//订单确认收货,增加商户采购金额
|
||||||
|
$merId = Merchant::where('uid', $order->uid)->value('mer_id');
|
||||||
|
if (!empty($merId)) {
|
||||||
|
Merchant::where('mer_id', $merId)->update(['purchase_amount' => Db::raw('purchase_amount+' . $order->pay_price)]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$svipDiscount = bcadd($order->svip_discount, $svipDiscount, 2);
|
$svipDiscount = bcadd($order->svip_discount, $svipDiscount, 2);
|
||||||
if (isset($subOrders[$order->order_sn])) {
|
if (isset($subOrders[$order->order_sn])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user