...
|
...
|
@@ -72,15 +72,12 @@ public class PaymentSupportService { |
|
|
if (codeMeta.getType() == OrderCodeType.SELLER_RECHARGE_EARNEST_TYPE.getType()){
|
|
|
return Lists.newArrayList(PayChannelType.REAL);
|
|
|
}
|
|
|
|
|
|
// 个人卖家上架保证金 ==> 用户没有入驻,上架商品缴纳的保证金
|
|
|
else if (codeMeta.getType() == OrderCodeType.SELLER_TYPE.getType()){
|
|
|
|
|
|
Pair<Integer, Integer> attributes = getOrderAttributes(orderCode);
|
|
|
// 海外
|
|
|
if (attributes.getRight() != null
|
|
|
&& (attributes.getRight() == OrderAttributes.OVERSEAS_IN_STOCK.getCode()
|
|
|
|| attributes.getRight() == OrderAttributes.OVERSEAS_PRE_SALE.getCode())){
|
|
|
if (isHkOrder(attributes)){
|
|
|
return Lists.newArrayList(PayChannelType.CROSS_BORDER);
|
|
|
}else{
|
|
|
return Lists.newArrayList(PayChannelType.REAL);
|
...
|
...
|
@@ -90,12 +87,12 @@ public class PaymentSupportService { |
|
|
else if (codeMeta.getType() == OrderCodeType.BUYER_TYPE.getType()){
|
|
|
|
|
|
Pair<Integer, Integer> attributes = getOrderAttributes(orderCode);
|
|
|
|
|
|
// 海外
|
|
|
if (isHkOrder(attributes)){
|
|
|
return Lists.newArrayList(PayChannelType.CROSS_BORDER);
|
|
|
}
|
|
|
// 闪购寄存
|
|
|
if (attributes.getLeft()!=null
|
|
|
&& attributes.getRight()!=null
|
|
|
&& attributes.getLeft() == OrderAttributes.DEPOSITE.getCode()
|
|
|
&& attributes.getRight() == OrderAttributes.QUICK_DELIVER.getCode()){
|
|
|
else if (isQuickDeliverDepositeOrder(attributes)){
|
|
|
return Lists.newArrayList(PayChannelType.REAL);
|
|
|
}else{
|
|
|
return Lists.newArrayList(PayChannelType.REAL, PayChannelType.VIRTUAL);
|
...
|
...
|
@@ -122,6 +119,12 @@ public class PaymentSupportService { |
|
|
return Lists.newArrayList(PayChannelType.REAL, PayChannelType.VIRTUAL);
|
|
|
}
|
|
|
|
|
|
private boolean isQuickDeliverDepositeOrder(Pair<Integer, Integer> attributes) {
|
|
|
return attributes.getLeft()!=null
|
|
|
&& attributes.getRight()!=null
|
|
|
&& attributes.getLeft() == OrderAttributes.DEPOSITE.getCode()
|
|
|
&& attributes.getRight() == OrderAttributes.QUICK_DELIVER.getCode();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 特定的支付方式
|
...
|
...
|
@@ -134,6 +137,11 @@ public class PaymentSupportService { |
|
|
return abstractOrderPaymentService.getAllowedPayments(orderCode);
|
|
|
}
|
|
|
|
|
|
private boolean isHkOrder(Pair<Integer, Integer> attributes) {
|
|
|
return attributes.getRight() != null
|
|
|
&& (attributes.getRight() == OrderAttributes.OVERSEAS_IN_STOCK.getCode()
|
|
|
|| attributes.getRight() == OrderAttributes.OVERSEAS_PRE_SALE.getCode());
|
|
|
}
|
|
|
|
|
|
private Pair<Integer, Integer> getOrderAttributes(long orderCode){
|
|
|
|
...
|
...
|
|