From 46fdf20b472a2c0aec0b6e8f507355d49cd41b5a Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 27 Jul 2024 16:12:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9CommissionProductLogi?= =?UTF-8?q?c=E7=B1=BB=E4=BB=A5=E8=B0=83=E6=95=B4=E5=88=86=E9=94=80?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/CommissionProductLogic.php | 28 +++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/app/common/logic/CommissionProductLogic.php b/app/common/logic/CommissionProductLogic.php index ab1597fe..d000c042 100644 --- a/app/common/logic/CommissionProductLogic.php +++ b/app/common/logic/CommissionProductLogic.php @@ -21,9 +21,6 @@ class CommissionProductLogic extends BaseLogic { $product = StoreBranchProduct::where('store_id', $order['store_id'])->where('product_id', $find['product_id'])->find(); if ($product && $product['rose'] > 0) { - if ($order['spread_uid'] > 0) { - $uid = $order['spread_uid']; - } if ($product['rose'] >= 4 && $product['rose'] < 8) { $rose = bcdiv($product['rose'], 100, 2); $total_price = bcmul($product['purchase'], $find['cart_num']); @@ -77,25 +74,24 @@ class CommissionProductLogic extends BaseLogic 'oid' => $order['id'], 'type' => 4, 'status' => 1, - ]; + ]; //会员 - if ($user_ship == 1) { - $data[] = [ - 'store_id' => $order['store_id'], - 'product_id' => $find['product_id'], - 'other_uid' => $uid, - 'number' => bcmul($total_price, $Distribution['user'], 2), - 'oid' => $order['id'], - 'type' => 0, - 'status' => 1, - ]; - } + $data[] = [ + 'store_id' => $order['store_id'], + 'product_id' => $find['product_id'], + 'other_uid' => $order['spread_uid'], + 'number' => bcmul($total_price, $Distribution['user'], 2), + 'oid' => $order['id'], + 'type' => 0, + 'status' => 1, + ]; + //个人店铺 if ($order['spread_uid'] > 0) { $data[] = [ 'store_id' => $order['store_id'], 'product_id' => $find['product_id'], - 'other_uid' => $uid, + 'other_uid' => $order['spread_uid'], 'number' => bcmul($total_price, $Distribution['person_store'], 2), 'oid' => $order['id'], 'type' => 5,