update: order service

This commit is contained in:
tokumeikoi 2022-03-05 12:40:11 +08:00
parent 4c9a38f722
commit 9ff76dedd7
2 changed files with 11 additions and 2 deletions

View File

@ -120,6 +120,7 @@ class OrderService
if ($user->invite_user_id && ($order->total_amount <= 0)) return; if ($user->invite_user_id && ($order->total_amount <= 0)) return;
$order->invite_user_id = $user->invite_user_id; $order->invite_user_id = $user->invite_user_id;
$inviter = User::find($user->invite_user_id); $inviter = User::find($user->invite_user_id);
if (!$inviter) return;
$isCommission = false; $isCommission = false;
switch ((int)$inviter->commission_type) { switch ((int)$inviter->commission_type) {
case 0: case 0:
@ -134,7 +135,7 @@ class OrderService
break; break;
} }
if ($isCommission) return; if (!$isCommission) return;
if ($inviter && $inviter->commission_rate) { if ($inviter && $inviter->commission_rate) {
$order->commission_balance = $order->total_amount * ($inviter->commission_rate / 100); $order->commission_balance = $order->total_amount * ($inviter->commission_rate / 100);
} else { } else {

View File

@ -14,5 +14,13 @@ window.settings = {
// 背景 // 背景
background_url: '', background_url: '',
// crisp // crisp
crisp_id: '' crisp_id: '',
i18n: [
'zh-CN',
'en-US',
'ja-JP',
'vi-VN',
'ko-KR',
'zh-TW'
]
} }