|
@@ -20,7 +20,7 @@ import com.yohoufo.dal.order.model.*; |
|
@@ -20,7 +20,7 @@ import com.yohoufo.dal.order.model.*; |
20
|
import com.yohoufo.order.common.RefundCase;
|
20
|
import com.yohoufo.order.common.RefundCase;
|
21
|
import com.yohoufo.order.common.TransferCase;
|
21
|
import com.yohoufo.order.common.TransferCase;
|
22
|
import com.yohoufo.order.constants.AlarmConfig;
|
22
|
import com.yohoufo.order.constants.AlarmConfig;
|
23
|
-import com.yohoufo.order.constants.CutomsClearanceFailType;
|
23
|
+import com.yohoufo.order.constants.ClearanceFailType;
|
24
|
import com.yohoufo.order.constants.MetaKey;
|
24
|
import com.yohoufo.order.constants.MetaKey;
|
25
|
import com.yohoufo.order.event.*;
|
25
|
import com.yohoufo.order.event.*;
|
26
|
import com.yohoufo.order.model.PayRefundBo;
|
26
|
import com.yohoufo.order.model.PayRefundBo;
|
|
@@ -347,8 +347,8 @@ public class BuyerOrderCancelService { |
|
@@ -347,8 +347,8 @@ public class BuyerOrderCancelService { |
347
|
}
|
347
|
}
|
348
|
|
348
|
|
349
|
|
349
|
|
350
|
- public void cancelOverseasOrder(long orderCode, String failReason, CutomsClearanceFailType failType){
|
|
|
351
|
- new CancelOverseasOrderModel(orderCode, failReason, failType).invoke().cancel();
|
350
|
+ public void clearanceFail(long orderCode, String failReason, ClearanceFailType failType){
|
|
|
351
|
+ new ClearanceFailModel(orderCode, failReason, failType).invoke().cancel();
|
352
|
}
|
352
|
}
|
353
|
|
353
|
|
354
|
private void compensateCoupon2Buyer(BigDecimal goodsAmount, int uid, long orderCode) {
|
354
|
private void compensateCoupon2Buyer(BigDecimal goodsAmount, int uid, long orderCode) {
|
|
@@ -543,10 +543,10 @@ public class BuyerOrderCancelService { |
|
@@ -543,10 +543,10 @@ public class BuyerOrderCancelService { |
543
|
EventBusPublisher.publishEvent(buyerRefundCouponEvent);
|
543
|
EventBusPublisher.publishEvent(buyerRefundCouponEvent);
|
544
|
}
|
544
|
}
|
545
|
|
545
|
|
546
|
- private class CancelOverseasOrderModel {
|
546
|
+ private class ClearanceFailModel {
|
547
|
private final long orderCode;
|
547
|
private final long orderCode;
|
548
|
private final String failReason;
|
548
|
private final String failReason;
|
549
|
- private final CutomsClearanceFailType failType;
|
549
|
+ private final ClearanceFailType failType;
|
550
|
|
550
|
|
551
|
|
551
|
|
552
|
String logTag;
|
552
|
String logTag;
|
|
@@ -554,18 +554,18 @@ public class BuyerOrderCancelService { |
|
@@ -554,18 +554,18 @@ public class BuyerOrderCancelService { |
554
|
private Consumer<RefundGoodsAmountNode> refundGoodsAmountConsumer;
|
554
|
private Consumer<RefundGoodsAmountNode> refundGoodsAmountConsumer;
|
555
|
private BuyerOrder buyerOrder;
|
555
|
private BuyerOrder buyerOrder;
|
556
|
|
556
|
|
557
|
- CancelOverseasOrderModel(long orderCode, String failReason, CutomsClearanceFailType failType) {
|
557
|
+ ClearanceFailModel(long orderCode, String failReason, ClearanceFailType failType) {
|
558
|
this.orderCode = orderCode;
|
558
|
this.orderCode = orderCode;
|
559
|
this.failReason = failReason;
|
559
|
this.failReason = failReason;
|
560
|
this.failType = failType;
|
560
|
this.failType = failType;
|
561
|
}
|
561
|
}
|
562
|
|
562
|
|
563
|
- public CancelOverseasOrderModel invoke() {
|
|
|
564
|
- logTag = String.format("cancel overseas order %s", orderCode);
|
563
|
+ public ClearanceFailModel invoke() {
|
|
|
564
|
+ logTag = String.format("clearance fail %s", orderCode);
|
565
|
logger.info("{} failType is {} failReason is {}", logTag, failType, failReason);
|
565
|
logger.info("{} failType is {} failReason is {}", logTag, failType, failReason);
|
566
|
|
566
|
|
567
|
throwServiceExceptionIf(orderCode <= 0L, "订单号不存在");
|
567
|
throwServiceExceptionIf(orderCode <= 0L, "订单号不存在");
|
568
|
- throwServiceExceptionIf(StringUtils.isBlank(failReason), "失败原因不能为空");
|
568
|
+ throwServiceExceptionIf(StringUtils.isBlank(failReason), "清关失败原因不能为空");
|
569
|
targetStatus = null;
|
569
|
targetStatus = null;
|
570
|
refundGoodsAmountConsumer = null;
|
570
|
refundGoodsAmountConsumer = null;
|
571
|
switch (failType) {
|
571
|
switch (failType) {
|
|
@@ -578,7 +578,7 @@ public class BuyerOrderCancelService { |
|
@@ -578,7 +578,7 @@ public class BuyerOrderCancelService { |
578
|
refundGoodsAmountConsumer = refundGoodsAmountNode -> userReason(refundGoodsAmountNode);
|
578
|
refundGoodsAmountConsumer = refundGoodsAmountNode -> userReason(refundGoodsAmountNode);
|
579
|
break;
|
579
|
break;
|
580
|
default:
|
580
|
default:
|
581
|
- throwServiceException("无效的目标状态");
|
581
|
+ throwServiceException("无效的清关失败原因");
|
582
|
}
|
582
|
}
|
583
|
|
583
|
|
584
|
buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
584
|
buyerOrder = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
|
|
@@ -708,7 +708,7 @@ public class BuyerOrderCancelService { |
|
@@ -708,7 +708,7 @@ public class BuyerOrderCancelService { |
708
|
Long orderCode = buyerOrder.getOrderCode();
|
708
|
Long orderCode = buyerOrder.getOrderCode();
|
709
|
//
|
709
|
//
|
710
|
|
710
|
|
711
|
- logger.info("cancelOverseasOrder refundGoodsAmount begin payRefundService.refund buyer, buyerUid {}, orderCode {}, skup {} refundAmount {}",
|
711
|
+ logger.info("clearanceFail refundGoodsAmount begin payRefundService.refund buyer, buyerUid {}, orderCode {}, skup {} refundAmount {}",
|
712
|
buyerUid, orderCode, skup, leftBuyerMoney );
|
712
|
buyerUid, orderCode, skup, leftBuyerMoney );
|
713
|
|
713
|
|
714
|
new RefundGoodsMoneyHandler().loadLogger(logger)
|
714
|
new RefundGoodsMoneyHandler().loadLogger(logger)
|
|
@@ -717,7 +717,7 @@ public class BuyerOrderCancelService { |
|
@@ -717,7 +717,7 @@ public class BuyerOrderCancelService { |
717
|
.loadTargetOrderStatus(targetOrderStatus)
|
717
|
.loadTargetOrderStatus(targetOrderStatus)
|
718
|
.loadSellerOrderGoods(sellerUid, skup)
|
718
|
.loadSellerOrderGoods(sellerUid, skup)
|
719
|
.refund();
|
719
|
.refund();
|
720
|
- logger.info("cancelOverseasOrder refundGoodsAmount after payRefundService.refund buyer, buyerUid {}, orderCode {}, skup {} refundAmount {}",
|
720
|
+ logger.info("clearanceFail refundGoodsAmount after payRefundService.refund buyer, buyerUid {}, orderCode {}, skup {} refundAmount {}",
|
721
|
buyerUid, orderCode, skup, leftBuyerMoney );
|
721
|
buyerUid, orderCode, skup, leftBuyerMoney );
|
722
|
}
|
722
|
}
|
723
|
}
|
723
|
}
|