...
|
...
|
@@ -8,6 +8,7 @@ import com.yoho.error.exception.ServiceException; |
|
|
import com.yohobuy.ufo.model.order.bo.AmountCutPolicy;
|
|
|
import com.yohobuy.ufo.model.order.common.*;
|
|
|
import com.yohobuy.ufo.model.order.constants.*;
|
|
|
import com.yohobuy.ufo.model.order.vo.AddressInfo;
|
|
|
import com.yohobuy.ufo.model.promotion.constant.CouponTypeEnum;
|
|
|
import com.yohoufo.common.alarm.EventBusPublisher;
|
|
|
import com.yohoufo.common.exception.UfoServiceException;
|
...
|
...
|
@@ -27,7 +28,6 @@ import com.yohoufo.order.constants.ActivityTypeEnum; |
|
|
import com.yohoufo.order.event.BuyerCancelEvent;
|
|
|
import com.yohoufo.order.event.ErpBuyerOrderEvent;
|
|
|
import com.yohoufo.order.event.NotPaidNoticeEvent;
|
|
|
import com.yohobuy.ufo.model.order.vo.AddressInfo;
|
|
|
import com.yohoufo.order.model.bo.ActivityBo;
|
|
|
import com.yohoufo.order.model.bo.AmountDetailBo;
|
|
|
import com.yohoufo.order.model.bo.CouponBo;
|
...
|
...
|
@@ -36,8 +36,8 @@ import com.yohoufo.order.model.dto.BuyerOrderSubmitResult; |
|
|
import com.yohoufo.order.model.dto.OrderBuilder;
|
|
|
import com.yohoufo.order.model.request.ShoppingRequest;
|
|
|
import com.yohoufo.order.model.response.*;
|
|
|
import com.yohoufo.order.service.ISubmitOrderService;
|
|
|
import com.yohoufo.order.service.IShoppingService;
|
|
|
import com.yohoufo.order.service.ISubmitOrderService;
|
|
|
import com.yohoufo.order.service.cache.CacheCleaner;
|
|
|
import com.yohoufo.order.service.cache.CacheKeyBuilder;
|
|
|
import com.yohoufo.order.service.listener.BuyerOrderChangeEvent;
|
...
|
...
|
@@ -58,13 +58,13 @@ import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.tuple.Pair;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Primary;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import org.springframework.context.annotation.Primary;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@Primary
|
|
|
@Service
|
|
|
public class ShoppingServiceImpl implements IShoppingService {
|
...
|
...
|
@@ -403,6 +403,7 @@ public class ShoppingServiceImpl implements IShoppingService { |
|
|
* @param shoppingRequest
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
public OrderSubmitResponse submit(ShoppingRequest shoppingRequest){
|
|
|
int skup;
|
|
|
int uid;
|
...
|
...
|
@@ -415,17 +416,18 @@ public class ShoppingServiceImpl implements IShoppingService { |
|
|
}
|
|
|
|
|
|
shoppingRiskWatchDog.checkWaitingPayCnt(uid);
|
|
|
//查询并校验用户地址
|
|
|
Pair<AddressInfo, AddressInfo> userAddressPair = getAndCheckAddressInfo(shoppingRequest);
|
|
|
|
|
|
// 检查skup是否可售
|
|
|
SellerOrderGoods psog = checkSkupSellOrNot(shoppingRequest.getUid(), shoppingRequest.getSkup());
|
|
|
|
|
|
shoppingRiskWatchDog.checkRealName4OverseasOrder(uid, psog.getAttributes());
|
|
|
|
|
|
checkSkupIsChangePrice(uid, skup);
|
|
|
|
|
|
//活动价格
|
|
|
ActivityPrice activityPrice = checkAndGetActivityPrice(shoppingRequest, psog);
|
|
|
|
|
|
//查询并校验用户地址
|
|
|
Pair<AddressInfo, AddressInfo> userAddressPair = getAndCheckAddressInfo(shoppingRequest);
|
|
|
//算费
|
|
|
ChargeContext chargeContext = buildChargeContext(shoppingRequest, psog, activityPrice, ChargeParam.SUBMIT);
|
|
|
chargeContext.setShipFeeRequird(true);
|
...
|
...
|
|