WIN-2308041133\Administrator преди 6 дни
родител
ревизия
69d62ae4be
променени са 1 файла, в които са добавени 5 реда и са изтрити 4 реда
  1. 5 4
      app/models/store/StoreOrder.php

+ 5 - 4
app/models/store/StoreOrder.php

@@ -942,16 +942,17 @@ class StoreOrder extends BaseModel
                     User::where('uid',$uid)->update(['brokerage_price'=>$blance]);
 
                 }
+            }
                 $rebate=0;
                 $userInfo = User::get($uid);
-                @file_put_contents('quanju4.txt',$order['cart_id'] . "-购物车id\r\n", 8);
+                @file_put_contents('quanju4.txt',$order['cart_id'] . "-购物车id1\r\n", 8);
 //            $shopping_cart = json_decode($order['cart_id'], true);
             $shopping_cart = $order['cart_id'];
 //            先不考虑什么商品返现比例了
             foreach ($shopping_cart as $cart) {
-                @file_put_contents('quanju4.txt',$cart . "-购物车id\r\n", 8);
+                @file_put_contents('quanju4.txt',$cart . "-购物车id2\r\n", 8);
                 $product_radio=0;
-                $product_info = StoreCart::get($cart);
+                $product_info = StoreCart::get(['id'=>$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)){
@@ -982,7 +983,7 @@ class StoreOrder extends BaseModel
                     }
                 }
             }
-            }
+
         }catch (\Exception $e) {
             // 处理异常
             @file_put_contents('quanju4.txt', json_encode(['line' => $e->getLine(), 'message' => $e->getMessage(), 'file' => $e->getFile()]) . "-会员等级激励奖报错内容\r\n", 8);