From 3986f86685fb70cf1cb9312671db7e3971d00f87 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Tue, 23 Jan 2024 16:55:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AE=A2=E5=8D=95=E5=88=86?= =?UTF-8?q?=E6=B6=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/consumption/CommissionDao.php | 8 ++++++-- app/listener/paySuccess.php | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/common/dao/store/consumption/CommissionDao.php b/app/common/dao/store/consumption/CommissionDao.php index 79e49781..017ce323 100644 --- a/app/common/dao/store/consumption/CommissionDao.php +++ b/app/common/dao/store/consumption/CommissionDao.php @@ -140,7 +140,7 @@ class CommissionDao { $curl = new Curl(); $timestamp = time(); - $json = ['timestamp' => $timestamp, 'data' => ['order_id' => $order['order_id'], 'order_sn' => $order['order_no'], 'order_money' => bcmul($order['pay_price'], 100), 'promotion_code' => $promotionCode]]; + $json = ['timestamp' => $timestamp, 'data' => ['order_id' => $order['order_id'], 'order_sn' => $order['order_sn'], 'order_money' => bcmul($order['pay_price'], 100), 'promotion_code' => $promotionCode]]; if ($type == 3) { $json['street_code'] = $promotionCode; } elseif ($type == 4) { @@ -153,7 +153,11 @@ class CommissionDao $encrypt = $aes->encrypt($json, $iv); $api = in_array($type, [1, 2]) ? 'user_first_order_share_profit' : 'user_order_share_profit'; $url = env('task.worker_host_url') . '/api/shop_call/' . $api; - $curl->post($url, ['timestamp' => $timestamp, 'data' => $encrypt]); + $result = $curl->post($url, ['timestamp' => $timestamp, 'data' => $encrypt]); + $result = json_decode($result, true); + if ($result['code'] != 1) { + Log::error('发送佣金失败:', $result); + } } } \ No newline at end of file diff --git a/app/listener/paySuccess.php b/app/listener/paySuccess.php index e80e9cf7..c7413042 100644 --- a/app/listener/paySuccess.php +++ b/app/listener/paySuccess.php @@ -37,7 +37,6 @@ class paySuccess $orderList = $event['groupOrder']['orderList']; $storeConsumptionUserDao = new StoreConsumptionUserDao(); $storeConsumptionUserDao->check($event['groupOrder']['uid'], $event['groupOrder']['group_order_id']); -// $storeConsumptionUserDao->reduce($event['groupOrder']['consumption_id'], $event['groupOrder']['consumption_money']); foreach ($orderList as $k => $order) { // $StoreProcessing->AutomaticallyCreateOrders($order);