Authored by chenchao

fix auto cancel before paid

... ... @@ -164,8 +164,12 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
.orderAttributes(getOrderAttributes())
.build();
appraiseOrderCreateService.createSellerDepoistOrder(context);
//TODO notice
//
SellerDepositOrderCancelAsyncEvent event = new SellerDepositOrderCancelAsyncEvent(this::handleOrderCancelAsyncEvent);
event.setUid(req.getUid());
event.setOrderCode(orderCode);
EventBusPublisher.publishEvent(event);
logger.info("submit seller deposit order , SellerDepositOrderCancelAsyncEvent send out, event {}", event);
return SellerDepositOrderSubmitResp.builder().orderCode(orderCode).build();
}
... ... @@ -231,6 +235,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
}
public int cancelByTimeout(OrderCancelEvent orderCancelEvent){
logger.info("in seller deposit order cancelByTimeout orderCancelEvent {}", orderCancelEvent);
Long orderCode = orderCancelEvent.getOrderCode();
int uid = orderCancelEvent.getUid();
if(!serviceOrderProcessor.isGoodsServiceOrder(orderCode)){
... ... @@ -607,11 +612,8 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
Integer uid = orderInfo.getUid();
AppraiseOrderStatus targetOrderStatus = AppraiseOrderStatus.HAS_PAYED;
inBoxFacade.sellerDepositOrderNotice(orderInfo.getUid(), orderInfo.getOrderCode(), targetOrderStatus);
SellerDepositOrderCancelAsyncEvent event = new SellerDepositOrderCancelAsyncEvent(this::handleOrderCancelAsyncEvent);
event.setUid(uid);
event.setOrderCode(orderCode);
EventBusPublisher.publishEvent(event);
logger.info("processAfterPay seller deposit order , SellerDepositOrderCancelAsyncEvent send out, event {}", event);
SellerCancelDeliverEvent cancelDeliverEvent =
SellerCancelDeliverEvent.builder()
.uid(orderInfo.getUid())
... ...