WIN-2308041133\Administrator hai 2 semanas
pai
achega
69d62ae4be
Modificáronse 1 ficheiros con 5 adicións e 4 borrados
  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]);
                     User::where('uid',$uid)->update(['brokerage_price'=>$blance]);
 
 
                 }
                 }
+            }
                 $rebate=0;
                 $rebate=0;
                 $userInfo = User::get($uid);
                 $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 = json_decode($order['cart_id'], true);
             $shopping_cart = $order['cart_id'];
             $shopping_cart = $order['cart_id'];
 //            先不考虑什么商品返现比例了
 //            先不考虑什么商品返现比例了
             foreach ($shopping_cart as $cart) {
             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_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);
                 @file_put_contents('quanju.txt', json_encode($product_info) . "-购物车详情\r\n", 8);
                 $product = StoreProduct::where('id', $product_info['product_id'])->find();  //商品返现比例
                 $product = StoreProduct::where('id', $product_info['product_id'])->find();  //商品返现比例
                 if (!empty($product)){
                 if (!empty($product)){
@@ -982,7 +983,7 @@ class StoreOrder extends BaseModel
                     }
                     }
                 }
                 }
             }
             }
-            }
+
         }catch (\Exception $e) {
         }catch (\Exception $e) {
             // 处理异常
             // 处理异常
             @file_put_contents('quanju4.txt', json_encode(['line' => $e->getLine(), 'message' => $e->getMessage(), 'file' => $e->getFile()]) . "-会员等级激励奖报错内容\r\n", 8);
             @file_put_contents('quanju4.txt', json_encode(['line' => $e->getLine(), 'message' => $e->getMessage(), 'file' => $e->getFile()]) . "-会员等级激励奖报错内容\r\n", 8);