|
|
@@ -36,6 +36,13 @@ public class OrderLifecycleService {
|
|
|
public static final String PAY_TYPE_CASH = "4";
|
|
|
/** 線下轉賬支付:用户线下银行转账,商家确认收款(payStatus 从 0 置 1)后解锁骑手接单 */
|
|
|
public static final String PAY_TYPE_TRANSFER = "6";
|
|
|
+ /** Apple Pay(023 重定义:历史 payType=5 无业务价值,5 现专指 Apple Pay) */
|
|
|
+ public static final String PAY_TYPE_APPLE_PAY = "5";
|
|
|
+
|
|
|
+ /** 银行卡类支付组(023):信用卡与 Apple Pay 共用同一支付商(当前为 OMG);判定订单是否走 OMG 渠道时用本方法而非单比 payType */
|
|
|
+ public static boolean isCardWalletPayType(String payType) {
|
|
|
+ return PAY_TYPE_OMG.equals(payType) || PAY_TYPE_APPLE_PAY.equals(payType);
|
|
|
+ }
|
|
|
|
|
|
private final IPosOrderService posOrderService;
|
|
|
private final OrderService billingService;
|
|
|
@@ -386,7 +393,7 @@ public class OrderLifecycleService {
|
|
|
throw new ServiceException("订单状态只能按规则向前推进");
|
|
|
}
|
|
|
if (current == 0L && targetState == 1L
|
|
|
- && PAY_TYPE_OMG.equals(order.getPayType()) && order.getPayStatus() != 1L) {
|
|
|
+ && isCardWalletPayType(order.getPayType()) && order.getPayStatus() != 1L) {
|
|
|
throw new ServiceException("OMG 订单支付成功后才能接单");
|
|
|
}
|
|
|
if (targetState == 4L && order.getPayStatus() != 0L) {
|
|
|
@@ -631,7 +638,7 @@ public class OrderLifecycleService {
|
|
|
if (order.getPayStatus() == 1L) {
|
|
|
return false;
|
|
|
}
|
|
|
- if (PAY_TYPE_OMG.equals(order.getPayType())) {
|
|
|
+ if (isCardWalletPayType(order.getPayType())) {
|
|
|
return true;
|
|
|
}
|
|
|
return "3".equals(order.getPayType()) && linePaymentService != null
|