宅男在线永久免费观看网直播,亚洲欧洲日产国码无码久久99,野花社区在线观看视频,亚洲人交乣女bbw,一本一本久久a久久精品综合不卡

全部
常見問題
產品動態(tài)
精選推薦

桌碼下單提交訂單數據有誤

管理 管理 編輯 刪除

問題說明:移動端桌碼下單提交數據加載有誤

修改文件:app\services\order\StoreOrderServices

修改方法:checkShipping()

public function checkShipping($uid, $cartIds, $new)
    {
        if ($new) {
            $cartIds = explode(',', $cartIds);
            $cartInfo = [];
            $redis = CacheService::redisHandler();
            foreach ($cartIds as $key) {
                $info = $redis->get($key);
                if ($info) {
                    $cartInfo[] = $info;
                }
            }
        } else {
            /** @var StoreCartServices $cartServices */
            $cartServices = app()->make(StoreCartServices::class);
            $cartInfo = $cartServices->getCartList(['uid' => $uid, 'status' => 1, 'id' => $cartIds], 0, 0, ['productInfo', 'attrInfo']);
        }
        if (!$cartInfo) {
            throw new ValidateException('獲取購物車信息失敗');
        }
        $arr = [];
        $store_id = [];
        $type = 0;
        //delivery_type :1、快遞,2、到店核銷,3、門店配送
		$productType = 0;
        foreach ($cartInfo as $item) {
			$productInfo = $item['productInfo'] ?? [];
			if (!$productInfo) continue;
			$productType = $productInfo['product_type'] ?? 0;
			if ($productType == 6) {//預約商品
				//預約類型1:到店服務+上門服務,2:到店服務,3:上門服務
				$reservation_type = (string)($productInfo['reservation_type'] ?? '1');
				$reservationTypeArr = $reservation_type == 1 ? ['2', '3'] : [$reservation_type];
				if (isset($item['reservation_type']) && in_array($item['reservation_type'], $reservationTypeArr)) {//選擇服務方式
					$delivery_type = [(string)$item['reservation_type']];
				} else {
					$delivery_type =[];
				}
			} else {
                if($item['type'] == 10) {
                    $arr = [2];
                    $type = 10;
                }
				$delivery_type = is_string($productInfo['delivery_type']) ? explode(',', $productInfo['delivery_type']) : $productInfo['delivery_type'];
				if (in_array(1, $delivery_type)) {//支持平臺配送 驗證平臺該商品
					if (isset($productInfo['type']) && $productInfo['type'] == 1 && isset($productInfo['pid']) && $productInfo['pid']) {
						/** @var StoreProductServices $productServices */
						$productServices = app()->make(StoreProductServices::class);
						$platInfo = $productServices->getCacheProductInfo((int)$productInfo['pid']);
						if (!$platInfo || $platInfo['stock'] <= 0) {
							unset($delivery_type[array_search('1', $delivery_type)]);
						}
					}
				}
			}
			//適用門店:0:僅平臺1:所有2:部分
			$applicable_type = $item['productInfo']['applicable_type'] ?? 1;
			if ($applicable_type == 0) {//僅平臺適用 排除門店
				$delivery_type = array_diff($delivery_type, [2, 3]);
			}
            $arr = array_unique(array_merge($arr, $delivery_type));
            if (isset($item['productInfo']['type']) && isset($item['productInfo']['relation_id']) && $item['productInfo']['type'] == 1 && $item['productInfo']['relation_id']) {
                $store_id[] = $item['productInfo']['relation_id'];
            }
        }
        $count = count($arr);
        if (!$count) {
            $arr = [1];
        }
		//平臺配送
		if (in_array(1, $arr)) {
			$shopOperationType = sys_config('shop_operation_type', 1);
			if ($shopOperationType == 3) {//單店模式,不支持平臺配送
				unset($arr[array_search(1, $arr)]);
			}
		}
		/** @var SystemStoreServices $SystemStoreServe */
		$SystemStoreServe = app()->make(SystemStoreServices::class);
        // 門店總開關
        if (!sys_config('store_func_status', 1)) {
            if (in_array(2, $arr)) unset($arr[array_search(2, $arr)]);
            if (in_array(3, $arr)) unset($arr[array_search(3, $arr)]);
        } else {
			if (in_array(2, $arr)) {//存在門店核銷方式
				if (sys_config('store_self_mention', 1)) {//門店核銷開啟
					//判斷有沒有滿足核銷的店鋪
					if ($productType != 6 && $type != 10) {//預約商品不限制這個條件
						if (!$SystemStoreServe->count(['id' => $store_id, 'delivery_type' => [1, 3], 'is_show' => 1, 'is_del' => 0])) {
							unset($arr[array_search(2, $arr)]);
						}
					}
				} else {
					unset($arr[array_search(2, $arr)]);
				}
			}
			if (in_array(3, $arr) && $productType != 6) {
				//判斷有沒有滿足配送的店鋪
				if (!$SystemStoreServe->count(['id' => $store_id, 'delivery_type' => [1, 2], 'is_show' => 1, 'is_del' => 0])) {
					unset($arr[array_search(3, $arr)]);
				}
			}
		}
        $arr = array_merge(array_unique($arr));
        return ['type' => $arr];
    }



請登錄后查看

全 最后編輯于2025-06-13 16:00:08

快捷回復
回復
回復
回復({{post_count}}) {{!is_user ? '我的回復' :'全部回復'}}
排序 默認正序 回復倒序 點贊倒序

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}} LV.{{ item.user_info.bbs_level || item.bbs_level }}

作者 管理員 企業(yè)

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest == 1? '取消推薦': '推薦'}}
{{item.is_suggest == 1? '取消推薦': '推薦'}}
沙發(fā) 板凳 地板 {{item.floor}}#
{{item.user_info.title || '暫無簡介'}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
打賞
已打賞¥{{item.reward_price}}
{{item.like_count}}
{{item.showReply ? '取消回復' : '回復'}}
刪除
回復
回復

{{itemc.user_info.nickname}}

{{itemc.user_name}}

回復 {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}
打賞
已打賞¥{{itemc.reward_price}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回復' : '回復'}}
刪除
回復
回復
查看更多
打賞
已打賞¥{{reward_price}}
228
{{like_count}}
{{collect_count}}
添加回復 ({{post_count}})

相關推薦

快速安全登錄

使用微信掃碼登錄
{{item.label}} 加精
{{item.label}} {{item.label}} 板塊推薦 常見問題 產品動態(tài) 精選推薦 首頁頭條 首頁動態(tài) 首頁推薦
取 消 確 定
回復
回復
問題:
問題自動獲取的帖子內容,不準確時需要手動修改. [獲取答案]
答案:
提交
bug 需求 取 消 確 定
打賞金額
當前余額:¥{{rewardUserInfo.reward_price}}
{{item.price}}元
請輸入 0.1-{{reward_max_price}} 范圍內的數值
打賞成功
¥{{price}}
完成 確認打賞

微信登錄/注冊

切換手機號登錄

{{ bind_phone ? '綁定手機' : '手機登錄'}}

{{codeText}}
切換微信登錄/注冊
暫不綁定
CRMEB客服

CRMEB咨詢熱線 咨詢熱線

400-8888-794

微信掃碼咨詢

CRMEB開源商城下載 源碼下載 CRMEB幫助文檔 幫助文檔
返回頂部 返回頂部
CRMEB客服