...
|
...
|
@@ -102,6 +102,9 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
|
@Autowired
|
|
|
private IExpressInfoService expressInfoService;
|
|
|
|
|
|
@Autowired
|
|
|
private DepositService depositService;
|
|
|
|
|
|
private boolean isDepositWithQuickDeliverGoods(int uid, long orderCode, Integer oa){
|
|
|
BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
|
|
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(pbog.getSkup());
|
...
|
...
|
@@ -125,7 +128,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
|
OrderStatus targetOrderStatus = OrderStatus.HAS_PAYED;
|
|
|
boolean isQuickDeliver = false;
|
|
|
boolean isDepositWithQuickDeliverGoods = false;
|
|
|
boolean isDerectPass = false;
|
|
|
//是否直接鉴定通过
|
|
|
boolean isDirectPass = false;
|
|
|
|
|
|
//门店订单支付后直接完成
|
|
|
if (BuyerOrderUtils.isOffline(orderInfo)) {
|
...
|
...
|
@@ -134,11 +138,12 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
|
// 闪购发货
|
|
|
else if (isQuickDeliver = BuyerOrderUtils.isQuickDeliver(orderInfo.getAttributes())) {
|
|
|
targetOrderStatus = OrderStatus.JUDGE_PASS;
|
|
|
isDirectPass = true;
|
|
|
}
|
|
|
// 闪购寄存
|
|
|
else if ((isDepositWithQuickDeliverGoods = isDepositWithQuickDeliverGoods(uid, orderCode, orderInfo.getAttributes()))) {
|
|
|
targetOrderStatus = OrderStatus.DONE;
|
|
|
isDerectPass = true;
|
|
|
isDirectPass = true;
|
|
|
}
|
|
|
logger.info("after paid updateOrderStatusPaid uid {} orderCode {} isQuickDeliver {} isDepositWithQuickDeliverGoods {} ",
|
|
|
uid, orderCode, isQuickDeliver, isDepositWithQuickDeliverGoods);
|
...
|
...
|
@@ -156,7 +161,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
|
logger.info("in updateOrderStatusPaid record status change, orderCode {}, status: {}",
|
|
|
orderCode, orderStatusCode);
|
|
|
orderStatusFlowService.addAsy(orderCode, orderStatusCode);
|
|
|
if (isDerectPass){
|
|
|
//打货款, 物权转移
|
|
|
if (isDirectPass){
|
|
|
boolean isDepositRequired = isDepositWithQuickDeliverGoods;
|
|
|
appraiseService.processQuickDeliverOrderAfterPaid(orderCode, uid, isDepositRequired);
|
|
|
}
|
...
|
...
|
@@ -253,12 +259,13 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
|
* @param sellerOrderGoods
|
|
|
*/
|
|
|
private void processQuickDeliverOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){
|
|
|
// notice
|
|
|
inBoxFacade.noticeWhenQuickDeliverOrderPaid(buyerOrder.getUid(), buyerOrder.getOrderCode(), sellerOrderGoods);
|
|
|
Integer sellerUid = buyerOrder.getSellerUid();
|
|
|
Integer buyerUid = buyerOrder.getUid();
|
|
|
Long orderCode = buyerOrder.getOrderCode();
|
|
|
Integer skup = sellerOrderGoods.getId();
|
|
|
// notice
|
|
|
inBoxFacade.noticeWhenQuickDeliverOrderPaid(buyerOrder.getUid(), buyerOrder.getOrderCode(), sellerOrderGoods);
|
|
|
|
|
|
try {
|
|
|
// 插入物流调拨信息
|
|
|
expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder()
|
...
|
...
|
|