Kaynağa Gözat

fix(order): 修复订单处理中地址ID为空的情况

- 添加了地址ID为空时的早期返回逻辑
- 防止在地址ID缺失时继续执行订单处理流程
- 确保在地址无效情况下返回正确的订单信息结构
shichen 2 ay önce
ebeveyn
işleme
173280646c

+ 4 - 0
app/common/repositories/store/order/StoreOrderRepository.php

@@ -2185,6 +2185,10 @@ class StoreOrderRepository extends BaseRepository
2185 2185
 
2186 2186
         $fzone_paytype = [];//会员专区,精彩生活区,组合支付
2187 2187
 //        Log::info($merchantInfo);
2188
+        if (!$addressId) {
2189
+            return ['order' => $merchantInfo];
2190
+
2191
+        }
2188 2192
         foreach ($merchantInfo as $k => $cartInfo) {
2189 2193
             $postageRule = [];
2190 2194
             $total_price = 0;