...
|
...
|
@@ -10,6 +10,8 @@ import com.yohoufo.common.ApiResponse; |
|
|
import com.yohoufo.common.caller.UfoServiceCaller;
|
|
|
import com.yohoufo.common.exception.UfoServiceException;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.order.charge.ChargeContext;
|
|
|
import com.yohoufo.order.charge.model.ActivityPrice;
|
|
|
import com.yohoufo.order.model.OfflineOrderBuilderFactory;
|
|
|
import com.yohoufo.order.model.OrderBuilderFactory;
|
|
|
import com.yohoufo.order.model.request.OfflineShoppingRequest;
|
...
|
...
|
@@ -19,7 +21,9 @@ import com.yohoufo.order.model.response.OfflinePaymentResponse; |
|
|
import com.yohoufo.order.model.response.OrderSubmitResponse;
|
|
|
import com.yohoufo.order.model.response.PaymentResponse;
|
|
|
import com.yohoufo.order.service.IOfflineShoppingService;
|
|
|
import com.yohoufo.order.utils.DeliveryWayUtils;
|
|
|
import com.yohoufo.order.utils.LoggerUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.commons.lang3.tuple.Pair;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
...
|
...
|
@@ -122,4 +126,20 @@ public class OfflineShoppingServiceImpl extends ShoppingServiceImpl implements I |
|
|
protected OrderBuilderFactory getOrderBuilderFactory() {
|
|
|
return new OfflineOrderBuilderFactory();
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected ChargeContext buildChargeContext(ShoppingRequest request,
|
|
|
SellerOrderGoods skupInfo,
|
|
|
ActivityPrice activityPrice,
|
|
|
int chargeStage) {
|
|
|
return chargeContextFactory.buildChargeContext(request, skupInfo, activityPrice, chargeStage,
|
|
|
(skupType) -> DeliveryWayEnum.SELF_FETCH.getCode(),
|
|
|
(shoppingRequest) -> {
|
|
|
if (StringUtils.isNoneBlank(request.getAddressId())) {
|
|
|
return getAndCheckAddressInfo(request);
|
|
|
} else {
|
|
|
return null;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
} |
...
|
...
|
|