调试平台手续费分润
This commit is contained in:
parent
888f425162
commit
98f0330441
@ -105,13 +105,19 @@ class paySuccessOrder
|
|||||||
Log::info("订单分佣:没有 $typeName 或比例为0");
|
Log::info("订单分佣:没有 $typeName 或比例为0");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
$financialTypeMap = [
|
||||||
|
'commission_to_town_rate' => 'town',
|
||||||
|
'commission_to_village_rate' => 'village',
|
||||||
|
'commission_to_service_team_rate' => 'service_team',
|
||||||
|
'commission_to_cloud_rate' => 'cloud_warehouse',
|
||||||
|
];
|
||||||
$amount = bcmul($this->totalAmount, (string)($rate / 100), 2);
|
$amount = bcmul($this->totalAmount, (string)($rate / 100), 2);
|
||||||
$this->finance[] = [
|
$this->finance[] = [
|
||||||
'order_id' => $this->event['order']['order_id'],
|
'order_id' => $this->event['order']['order_id'],
|
||||||
'order_sn' => $this->event['order']['order_sn'],
|
'order_sn' => $this->event['order']['order_sn'],
|
||||||
'user_info' => $this->event['order']->user->nickname,
|
'user_info' => $this->event['order']->user->nickname,
|
||||||
'user_id' => $this->event['order']['uid'],
|
'user_id' => $this->event['order']['uid'],
|
||||||
'financial_type' => 'cloud_warehouse_commission',
|
'financial_type' => $financialTypeMap[$field] . 'commission',
|
||||||
'financial_pm' => 1,
|
'financial_pm' => 1,
|
||||||
'type' => 1,
|
'type' => 1,
|
||||||
'number' => $amount,
|
'number' => $amount,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user