diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 098835c79..c3863f048 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -564,6 +564,7 @@ class PayNotifyLogic extends BaseLogic $village_uid = 0; $brigade_uid = 0; $user_ship = 0; + $spread_user_ship = 0; $order['dealVipAmount'] = 0; try { Redis::send('order_wetcha_push_send', ['order' => $order]); @@ -597,8 +598,8 @@ class PayNotifyLogic extends BaseLogic // $order['dealVipAmount']= self::dealVipAmount($order, $order['pay_type']); // } if ($order['spread_uid'] > 0 && $user_ship == 0) { - $user_ship = User::where('id', $order['spread_uid'])->value('user_ship'); - if ($user_ship == 2) { + $spread_user_ship = User::where('id', $order['spread_uid'])->value('user_ship'); + if ($spread_user_ship == 2) { $village_uid = $order['spread_uid']; $address = UserAddress::where(['uid' => $order['spread_uid'], 'is_default' => 1])->find(); if ($address) { @@ -607,7 +608,7 @@ class PayNotifyLogic extends BaseLogic $brigade_uid = User::where('id', 'in', $arr2)->where('user_ship', 3)->value('id') ?? 0; } } - } elseif ($user_ship == 3) { + } elseif ($spread_user_ship == 3) { $brigade_uid = $order['spread_uid']; $address = UserAddress::where(['uid' => $order['spread_uid'], 'is_default' => 1])->find(); if ($address) { @@ -646,7 +647,7 @@ class PayNotifyLogic extends BaseLogic $info = StoreOrderCartInfo::where('oid', $order['id'])->field('store_id,product_id,cart_num')->select(); $comm = new CommissionProductLogic(); foreach ($info as $v) { - $comm->calculate_product_flow($v, $order, $village_uid, $brigade_uid,$user_ship); + $comm->calculate_product_flow($v, $order, $village_uid, $brigade_uid,$user_ship,$spread_user_ship); } CommissionLogic::setStore($order,$village_uid, $brigade_uid, $transaction_id); return true;