From 5374b01c8cad6fe98b42fb9874382f2e45ec6ddf Mon Sep 17 00:00:00 2001 From: ljl Date: Tue, 15 Aug 2023 14:48:51 +0800 Subject: [PATCH] y --- app/Service/PaymentService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Service/PaymentService.php b/app/Service/PaymentService.php index a4876da..0345ee3 100644 --- a/app/Service/PaymentService.php +++ b/app/Service/PaymentService.php @@ -108,17 +108,17 @@ class PaymentService extends AbstractService $platformAccount = User::getPlatformAccount(); $fee = $platformAccount ? floor($order->amount * 0.01) : 0; $orderSplitInfos = []; - $splitUserIds = array_column($params['splitInfoList'], 'userId'); + $splitUserIds = array_column($params['splitInfoList'], 'splitUserId'); $users = User::where('app_id', $app->app_id)->whereIn('user_id', $splitUserIds)->get()->keyBy('user_id'); foreach ($params['splitInfoList'] as $splitInfo) { - $splitUser = $users[$splitInfo['userId']]; - $splitAmount = $splitInfo['sellerFlag'] == 1 ? ($splitInfo['amount'] - $fee): $splitInfo['amount']; + $splitUser = $users[$splitInfo['splitUserId']]; + $splitAmount = $splitInfo['sellerFlag'] == 1 ? ($splitInfo['splitAmount'] - $fee): $splitInfo['splitAmount']; $orderSplitInfos[] = [ 'app_id' => $app->app_id, 'user_id' => $user->user_id, 'member_id' => $user->member_id, 'split_member_id' => $splitUser->member_id, - 'split_user_id' => $splitInfo['userId'], + 'split_user_id' => $splitInfo['splitUserId'], 'split_user_type' => $splitUser->user_type, 'order_no' => $order->order_no, 'out_order_no' => $order->out_order_no,