From cc07197b99ffd5a0ffa0b3dd9e091d2079ce961f Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Sun, 21 Jan 2024 16:16:30 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=94=A8=E6=88=B7=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/ShopCallController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/api/controller/ShopCallController.php b/app/api/controller/ShopCallController.php index 5be6e119..5dc28e3e 100644 --- a/app/api/controller/ShopCallController.php +++ b/app/api/controller/ShopCallController.php @@ -186,22 +186,24 @@ class ShopCallController extends BaseApiController $orderMoney = $requestDatas['order_money']; // 订单金额 分 $orderNo = $requestDatas['order_no']; // 订单金额 $orderId = $requestDatas['order_id']; // 订单id + $courierPhone = $requestDatas['courier_phone']; // 配送员账号 // 镇合伙人 $userSelf = UserLogic::getUser(['street'=>$streetCode, 'group_id'=>15]); - if (empty($userSelf)) { - return $this->fail('镇合伙人不存在'); - } + // 配送员 + $courier = UserLogic::getUser(['account'=>$courierPhone]); $proportion = 0.01; // 比例 // 计算分润 UserLogic::userProfit($userSelf, $orderMoney, $proportion, $orderNo); + UserLogic::userProfit($courier, $orderMoney, $proportion, $orderNo); // 通知商城 $request['user'] = [ ['type' => 3, 'account' => $userSelf['account'], 'user_profit' => bcmul($orderMoney, 0.01, 2)], + ['type' => 4, 'account' => $courier['account'], 'user_profit' => bcmul($orderMoney, 0.01, 2)], ]; $request['order_id'] = $orderId; $timestamp = time();