WIN-2308041133\Administrator 2 months ago
parent
commit
1a8bc61db1
1 changed files with 17 additions and 17 deletions
  1. 17 17
      app/services/order/StoreOrderCreateServices.php

+ 17 - 17
app/services/order/StoreOrderCreateServices.php

@@ -233,23 +233,23 @@ class StoreOrderCreateServices extends BaseServices
 //                @file_put_contents('quanju.txt', json_encode($cart) . "-购物车\r\n", 8);
 
             }
-            if ($is_lb == 1){
-                if ($lb_spread_uid == 0){
-                    throw new ApiException('没有推荐关系或者推荐人的用户无法购买,请重新扫描推荐二维码');
-                }
-                /** @var StoreProductGiftGroupService  $storeProductGiftGroupService */
-                $storeProductGiftGroupService = app()->make(StoreProductGiftGroupService::class);
-
-                // 检查用户是否已在礼包关系表中存在(作为uid或pid)
-                $existsAsUid = $storeProductGiftGroupService->getOne(['uid' => $uid]);
-                $existsAsPid = $storeProductGiftGroupService->getOne(['pid' => $uid]);
-
-                // 如果两者都不存在,说明用户还没参与礼包推荐关系,无法购买
-                if (!$existsAsUid && !$existsAsPid) {
-                    throw new ApiException('没有推荐关系或者推荐人的用户无法购买,请重新扫描推荐二维码');
-                }
-
-            }
+//            if ($is_lb == 1){
+//                if ($lb_spread_uid == 0){
+//                    throw new ApiException('没有推荐关系或者推荐人的用户无法购买,请重新扫描推荐二维码');
+//                }
+//                /** @var StoreProductGiftGroupService  $storeProductGiftGroupService */
+//                $storeProductGiftGroupService = app()->make(StoreProductGiftGroupService::class);
+//
+//                // 检查用户是否已在礼包关系表中存在(作为uid或pid)
+//                $existsAsUid = $storeProductGiftGroupService->getOne(['uid' => $uid]);
+//                $existsAsPid = $storeProductGiftGroupService->getOne(['pid' => $uid]);
+//
+//                // 如果两者都不存在,说明用户还没参与礼包推荐关系,无法购买
+//                if (!$existsAsUid && !$existsAsPid) {
+//                    throw new ApiException('没有推荐关系或者推荐人的用户无法购买,请重新扫描推荐二维码');
+//                }
+//
+//            }
             if (count($cartInfo) == 1 && isset($cartInfo[0]['productInfo']['presale']) && $cartInfo[0]['productInfo']['presale'] == 1) {
                 $advance_id = $cartInfo[0]['product_id'];
             } else {