|
|
@@ -892,8 +892,12 @@ class StoreOrder extends BaseModel
|
|
|
{
|
|
|
try {
|
|
|
$userInfo = User::get($uid);
|
|
|
+ @file_put_contents('quanju.txt', json_encode($userInfo) . "-会员等级激励奖报错内容3\r\n", 8);
|
|
|
+
|
|
|
if ($userInfo['level'] > 0) {
|
|
|
$user_radio = UserLevel::where('id', $userInfo['level'])->value('rebate_ratio'); //用户等级返现比例
|
|
|
+ @file_put_contents('quanju.txt', json_encode($user_radio) . "-会员等级激励奖报错内容4\r\n", 8);
|
|
|
+
|
|
|
$rebate = bcmul($order['pay_price'], bcdiv($user_radio, 100, 2), 2); //用户返现金额
|
|
|
$blance = bcadd($userInfo['brokerage_price'], $rebate, 2); //用户佣金
|
|
|
@file_put_contents('quanju.txt', json_encode(['line' => $rebate, 'message' => $order['id'], 'file' => $blance]) . "-会员等级激励奖报错内容2\r\n", 8);
|