update 用户首页
This commit is contained in:
parent
80e84e0a96
commit
cc07197b99
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue