Merge pull request '调整订单分润' (#132) from dev into master
Reviewed-on: #132
This commit is contained in:
commit
581bd5fbce
@ -140,7 +140,7 @@ class CommissionDao
|
|||||||
{
|
{
|
||||||
$curl = new Curl();
|
$curl = new Curl();
|
||||||
$timestamp = time();
|
$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) {
|
if ($type == 3) {
|
||||||
$json['street_code'] = $promotionCode;
|
$json['street_code'] = $promotionCode;
|
||||||
} elseif ($type == 4) {
|
} elseif ($type == 4) {
|
||||||
@ -153,7 +153,11 @@ class CommissionDao
|
|||||||
$encrypt = $aes->encrypt($json, $iv);
|
$encrypt = $aes->encrypt($json, $iv);
|
||||||
$api = in_array($type, [1, 2]) ? 'user_first_order_share_profit' : 'user_order_share_profit';
|
$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;
|
$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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -37,7 +37,6 @@ class paySuccess
|
|||||||
$orderList = $event['groupOrder']['orderList'];
|
$orderList = $event['groupOrder']['orderList'];
|
||||||
$storeConsumptionUserDao = new StoreConsumptionUserDao();
|
$storeConsumptionUserDao = new StoreConsumptionUserDao();
|
||||||
$storeConsumptionUserDao->check($event['groupOrder']['uid'], $event['groupOrder']['group_order_id']);
|
$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) {
|
foreach ($orderList as $k => $order) {
|
||||||
//
|
//
|
||||||
$StoreProcessing->AutomaticallyCreateOrders($order);
|
$StoreProcessing->AutomaticallyCreateOrders($order);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user