1
This commit is contained in:
@@ -94,7 +94,9 @@ public class OrderBusinessService {
|
||||
ShopOrder shopOrder = buildShopOrder(request, loginUser);
|
||||
|
||||
//3. 处理收货地址信息
|
||||
processDeliveryAddress(shopOrder, request, loginUser);
|
||||
if(!(shopOrder.getOrderType() != null && shopOrder.getOrderType() == 2)){
|
||||
processDeliveryAddress(shopOrder, request, loginUser);
|
||||
}
|
||||
|
||||
//4. 下单时校验配送范围(电子围栏)
|
||||
validateDeliveryFenceIfNeeded(shopOrder, loginUser);
|
||||
@@ -554,7 +556,9 @@ public class OrderBusinessService {
|
||||
return;
|
||||
}
|
||||
// 5. 如果用户没有任何收货地址,抛出异常
|
||||
throw new BusinessException("请先添加收货地址");
|
||||
if(Arrays.asList(1, 3, 4).contains(shopOrder.getOrderType())){
|
||||
throw new BusinessException("请先添加收货地址");
|
||||
}
|
||||
|
||||
} catch (BusinessException e) {
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user