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);