Merge pull request '调整订单分润' (#132) from dev into master

Reviewed-on: #132
This commit is contained in:
mkm 2024-01-23 17:18:55 +08:00
commit 581bd5fbce
2 changed files with 6 additions and 3 deletions

View File

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

View File

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