|
|
@@ -951,7 +951,8 @@ class StoreOrder extends BaseModel
|
|
|
foreach ($shopping_cart as $cart) {
|
|
|
@file_put_contents('quanju4.txt',$cart . "-购物车id\r\n", 8);
|
|
|
$product_radio=0;
|
|
|
- $product_info = StoreCart::get($cart['cart_id']);
|
|
|
+ $product_info = StoreCart::get($cart);
|
|
|
+ @file_put_contents('quanju.txt', json_encode($product_info) . "-购物车详情\r\n", 8);
|
|
|
$product = StoreProduct::where('id', $product_info['product_id'])->find(); //商品返现比例
|
|
|
if (!empty($product)){
|
|
|
$product = $product->toArray();
|
|
|
@@ -977,11 +978,10 @@ class StoreOrder extends BaseModel
|
|
|
UserBill::income('下级商品返利', $uid, 'brokerage_price', 'order_money', $rebate, $order['id'], $blance, '下级购买商品的商品返利佣金');
|
|
|
return true;
|
|
|
}
|
|
|
+ User::where('uid',$uid)->update(['brokerage_price'=>$blance]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- User::where('uid',$uid)->update(['brokerage_price'=>$blance]);
|
|
|
-
|
|
|
}
|
|
|
}catch (\Exception $e) {
|
|
|
// 处理异常
|