WIN-2308041133\Administrator 1 hónapja
szülő
commit
3e2970d6d3

+ 5 - 1
app/admin/controller/store/StoreProduct.php

@@ -82,7 +82,11 @@ class StoreProduct extends AuthController
         }
 
         if ($type == null) $type = 1;
-        $this->assign(compact('type', 'onsale', 'forsale', 'warehouse', 'outofstock', 'policeforce', 'recycle'));
+        $adminInfo = $this->adminInfo;
+        @file_put_contents('quanju.txt',  json_encode($adminInfo)."-管理员信息\r\n", 8);
+
+        $mer_id = $adminInfo['mer_id'];
+        $this->assign(compact('type', 'onsale', 'forsale', 'warehouse', 'outofstock', 'policeforce', 'recycle','mer_id'));
         return $this->fetch();
     }
 

+ 7 - 7
app/models/store/StoreOrder.php

@@ -481,7 +481,7 @@ class StoreOrder extends BaseModel
             //生成门店订单信息
             self::createOrderPart($orderInfo); //拆单创建门店订单表
             $res5 = true;
-            @file_put_contents('quanju.txt',  "-报错点1\r\n", 8);
+//            @file_put_contents('quanju.txt',  "-报错点1\r\n", 8);
 
             foreach ($cartInfo as $cart) {
                 //减库存加销量
@@ -490,23 +490,23 @@ class StoreOrder extends BaseModel
                 else if ($bargain_id) $res5 = $res5 && StoreBargain::decBargainStock($cart['cart_num'], $bargain_id, isset($cart['productInfo']['attrInfo']) ? $cart['productInfo']['attrInfo']['unique'] : '');
                 else $res5 = $res5 && StoreProduct::decProductStock($cart['cart_num'], $cart['productInfo']['id'], isset($cart['productInfo']['attrInfo']) ? $cart['productInfo']['attrInfo']['unique'] : '');
             }
-            @file_put_contents('quanju.txt',  "-报错点2\r\n", 8);
+//            @file_put_contents('quanju.txt',  "-报错点2\r\n", 8);
 
             //保存购物车商品信息
             $res4 = false !== StoreOrderCartInfo::setCartInfo($order['id'], $cartInfo);
-            @file_put_contents('quanju.txt',  "-报错点3\r\n", 8);
+//            @file_put_contents('quanju.txt',  "-报错点3\r\n", 8);
 
             //购物车状态修改
             $res6 = false !== StoreCart::where('id', 'IN', $cartIds)->update(['is_pay' => 1]);
             if (!$res4 || !$res5 || !$res6) return self::setErrorInfo('订单生成失败!', true);
-            @file_put_contents('quanju.txt',  "-报错点4\r\n", 8);
+//            @file_put_contents('quanju.txt',  "-报错点4\r\n", 8);
 
             //自动设置默认地址
             UserRepository::storeProductOrderCreateEbApi($order, compact('cartInfo', 'addressId'));
-            @file_put_contents('quanju.txt',  "-报错点5\r\n", 8);
+//            @file_put_contents('quanju.txt',  "-报错点5\r\n", 8);
 
             self::clearCacheOrderInfo($uid, $key);
-            @file_put_contents('quanju.txt',  "-报错点6\r\n", 8);
+//            @file_put_contents('quanju.txt',  "-报错点6\r\n", 8);
 
             self::commitTrans();
             StoreOrderStatus::status($order['id'], 'cache_key_create_order', '订单生成');
@@ -540,7 +540,7 @@ class StoreOrder extends BaseModel
                 return $item;
             })
             ->toArray();
-        @file_put_contents('quanju.txt',  "-测试2\r\n", 8);
+//        @file_put_contents('quanju.txt',  "-测试2\r\n", 8);
 
         $grouped = array_column($cartInfo, 'ids', 'mer_id');
         foreach ($cartInfo as $k => $v) {