|
|
@@ -920,7 +920,7 @@ class StoreOrder extends BaseModel
|
|
|
@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'); //用户等级返现比例
|
|
|
+ $user_radio = SystemUserLevel::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); //用户返现金额
|
|
|
@@ -945,6 +945,8 @@ class StoreOrder extends BaseModel
|
|
|
$shopping_cart = json_decode($order['cart_id'], true);
|
|
|
// 先不考虑什么商品返现比例了
|
|
|
foreach ($shopping_cart as $cart) {
|
|
|
+ @file_put_contents('quanju4.txt',$cart . "-购物车id\r\n", 8);
|
|
|
+
|
|
|
$product_info = StoreCart::get($cart['cart_id']);
|
|
|
$product = StoreProduct::where('id', $product_info['product_id'])->find(); //商品返现比例
|
|
|
$product_radio = $product['rebate_ratio'];
|