...
|
...
|
@@ -24,18 +24,22 @@ import com.yohoufo.dal.order.model.BuyerOrderGoods; |
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.order.common.ActionStatusHold;
|
|
|
import com.yohoufo.order.common.DelStatus;
|
|
|
import com.yohoufo.order.common.Payment;
|
|
|
import com.yohoufo.order.event.BeforeDepotReceiveEvent;
|
|
|
import com.yohoufo.order.event.BeforeSellerDeliverEvent;
|
|
|
import com.yohobuy.ufo.model.order.vo.AddressInfo;
|
|
|
import com.yohoufo.order.model.PayQueryBo;
|
|
|
import com.yohoufo.order.model.request.OrderListRequest;
|
|
|
import com.yohoufo.order.model.request.OrderRequest;
|
|
|
import com.yohoufo.order.model.response.OrderDetailInfo;
|
|
|
import com.yohoufo.order.model.response.OrderSummaryResp;
|
|
|
import com.yohoufo.order.service.IBuyerOrderMetaService;
|
|
|
import com.yohoufo.order.service.IBuyerOrderService;
|
|
|
import com.yohoufo.order.service.IPaymentService;
|
|
|
import com.yohoufo.order.service.cache.CacheCleaner;
|
|
|
import com.yohoufo.order.service.cache.CacheKeyBuilder;
|
|
|
import com.yohoufo.order.service.cache.OrderCacheService;
|
|
|
import com.yohoufo.order.service.pay.AbstractPayService;
|
|
|
import com.yohoufo.order.service.proxy.InBoxFacade;
|
|
|
import com.yohoufo.order.service.proxy.ProductProxyService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
...
|
...
|
@@ -74,6 +78,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
@Autowired
|
|
|
private InBoxFacade inBoxFacade;
|
|
|
|
|
|
@Autowired
|
|
|
IPaymentService paymentService;
|
|
|
|
|
|
@Autowired
|
|
|
private OrderCacheService orderCacheService;
|
...
|
...
|
@@ -427,6 +433,19 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
orderRequest.getUid(), orderRequest.getOrderCode(), buyerOrder.getStatus());
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
|
|
|
// 到第三方检查,如果已经支付完成,则无法自动取消
|
|
|
Payment payment = Payment.getPayment(buyerOrder.getPayment());
|
|
|
if (payment != null){
|
|
|
AbstractPayService payService = paymentService.getPayService(payment.getCode());
|
|
|
PayQueryBo payQueryBo = payService.payQuery(String.valueOf(buyerOrder.getOrderCode()));
|
|
|
|
|
|
if (payQueryBo != null && payQueryBo.isPayStatus()){
|
|
|
logger.warn("check status failed b, uid is {}, orderCode is {}, status is {}",
|
|
|
orderRequest.getUid(), orderRequest.getOrderCode(), buyerOrder.getStatus());
|
|
|
throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|