|
@@ -578,7 +578,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
@@ -578,7 +578,7 @@ public class PaymentServiceImpl implements IPaymentService { |
578
|
} else if (transferChancelSelector.isTransferWithAlipayExceedMillionTransfer()) {//超过百万,使用更大额度的接口
|
578
|
} else if (transferChancelSelector.isTransferWithAlipayExceedMillionTransfer()) {//超过百万,使用更大额度的接口
|
579
|
transfer.setInterfaceType(INTERFACE_TYPE_TRANSFER_WHEN_EXCEED_MILLION);
|
579
|
transfer.setInterfaceType(INTERFACE_TYPE_TRANSFER_WHEN_EXCEED_MILLION);
|
580
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
580
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
581
|
- transferWithAlipayExceedMillionTransfer(logTag, record, buyerOrderCode, account, transferAmount, transfer);
|
581
|
+ transferWithAlipayExceedMillionTransfer(logTag, record, buyerOrderCode, account, transferAmount, transfer,false);
|
582
|
} else {
|
582
|
} else {
|
583
|
transfer.setInterfaceType(INTERFACE_TYPE_TRANSFER_NON_EXCEED_MILLION);
|
583
|
transfer.setInterfaceType(INTERFACE_TYPE_TRANSFER_NON_EXCEED_MILLION);
|
584
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
584
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
@@ -829,7 +829,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
@@ -829,7 +829,7 @@ public class PaymentServiceImpl implements IPaymentService { |
829
|
|
829
|
|
830
|
private void doManualDeal(Integer tradeBillsId, ManualDealRequest req) {
|
830
|
private void doManualDeal(Integer tradeBillsId, ManualDealRequest req) {
|
831
|
throwServiceExceptionIf(tradeBillsId == null || tradeBillsId < 1, "流水Id不合法");
|
831
|
throwServiceExceptionIf(tradeBillsId == null || tradeBillsId < 1, "流水Id不合法");
|
832
|
- throwServiceExceptionIf(req.getOperateUid() == null || req.getOperateUid() < 1, "客服uid不合法");
|
832
|
+ throwServiceExceptionIf(req.getOperateUid() == null || req.getOperateUid() < 0, "客服uid不合法");
|
833
|
throwServiceExceptionIf(StringUtils.isBlank(req.getOperateUname()), "客服名称不合法");
|
833
|
throwServiceExceptionIf(StringUtils.isBlank(req.getOperateUname()), "客服名称不合法");
|
834
|
TradeBills tradeBills = tradeBillsMapper.selectByPrimaryKey(tradeBillsId);
|
834
|
TradeBills tradeBills = tradeBillsMapper.selectByPrimaryKey(tradeBillsId);
|
835
|
throwServiceExceptionIf(tradeBills == null, "流水不存在");
|
835
|
throwServiceExceptionIf(tradeBills == null, "流水不存在");
|
|
@@ -838,16 +838,9 @@ public class PaymentServiceImpl implements IPaymentService { |
|
@@ -838,16 +838,9 @@ public class PaymentServiceImpl implements IPaymentService { |
838
|
// 是否处理过的
|
838
|
// 是否处理过的
|
839
|
throwServiceExceptionIf(Objects.nonNull(tradeBillsMapper.selectByDealRelateId(tradeBillsId)), "该流水已经处理过");
|
839
|
throwServiceExceptionIf(Objects.nonNull(tradeBillsMapper.selectByDealRelateId(tradeBillsId)), "该流水已经处理过");
|
840
|
|
840
|
|
841
|
-
|
|
|
842
|
String logTag = String.format("manual deal orderCode is %s tradeBillId is %s uid is %s", tradeBills.getOrderCode(), tradeBillsId, tradeBills.getUid());
|
841
|
String logTag = String.format("manual deal orderCode is %s tradeBillId is %s uid is %s", tradeBills.getOrderCode(), tradeBillsId, tradeBills.getUid());
|
843
|
- BigDecimal amount = null;
|
|
|
844
|
- try {
|
|
|
845
|
- amount = new BigDecimal(req.getAmount()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
|
|
|
846
|
- } catch (Exception e) {
|
|
|
847
|
- throwServiceException("转账金额不合法");
|
|
|
848
|
- }
|
|
|
849
|
- throwServiceExceptionIf(amount.compareTo(new BigDecimal("0.1")) < 0, "转账金额小于0.1");
|
|
|
850
|
- throwServiceExceptionIf(tradeBills.getAmount().compareTo(amount) != 0, "转账金额有误");
|
842
|
+
|
|
|
843
|
+
|
851
|
throwServiceExceptionIf(tradeBills.getTradeStatus() == HK_AMOUNT_WAIT_PAYMENT.getCode()
|
844
|
throwServiceExceptionIf(tradeBills.getTradeStatus() == HK_AMOUNT_WAIT_PAYMENT.getCode()
|
852
|
|| tradeBills.getTradeStatus() == YOHO_STORE_AMOUNT_WAIT_PAYMENT.getCode(), "该流不可操作:待结算");
|
845
|
|| tradeBills.getTradeStatus() == YOHO_STORE_AMOUNT_WAIT_PAYMENT.getCode(), "该流不可操作:待结算");
|
853
|
|
846
|
|
|
@@ -867,8 +860,16 @@ public class PaymentServiceImpl implements IPaymentService { |
|
@@ -867,8 +860,16 @@ public class PaymentServiceImpl implements IPaymentService { |
867
|
tradeBills.setPayType(optMarkPaidPayType(req.getSceneId()).get());
|
860
|
tradeBills.setPayType(optMarkPaidPayType(req.getSceneId()).get());
|
868
|
markPaid(logTag, tradeBills, lockKey);
|
861
|
markPaid(logTag, tradeBills, lockKey);
|
869
|
}
|
862
|
}
|
|
|
863
|
+ BigDecimal amount = null;
|
|
|
864
|
+ try {
|
|
|
865
|
+ amount = new BigDecimal(req.getAmount()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
|
|
|
866
|
+ } catch (Exception e) {
|
|
|
867
|
+ throwServiceException("转账金额不合法");
|
|
|
868
|
+ }
|
|
|
869
|
+ throwServiceExceptionIf(amount.compareTo(new BigDecimal("0.1")) < 0, "转账金额小于0.1");
|
|
|
870
|
+ throwServiceExceptionIf(tradeBills.getAmount().compareTo(amount) != 0, "转账金额有误");
|
870
|
// 退求购定金、货款、普通用户退保证金
|
871
|
// 退求购定金、货款、普通用户退保证金
|
871
|
- else if (isRefundGoodsMoneyOrDepositMoneyTradeBills(tradeBills) || isRefundEarnestMoneyTradeBills(tradeBills)) {
|
872
|
+ if (isRefundGoodsMoneyOrDepositMoneyTradeBills(tradeBills) || isRefundEarnestMoneyTradeBills(tradeBills)) {
|
872
|
refund(logTag, tradeBills, amount, lockKey);
|
873
|
refund(logTag, tradeBills, amount, lockKey);
|
873
|
}
|
874
|
}
|
874
|
// 转账
|
875
|
// 转账
|
|
@@ -981,7 +982,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
@@ -981,7 +982,7 @@ public class PaymentServiceImpl implements IPaymentService { |
981
|
if (transferChancelSelector.isTransferWithWallet(interfaceType)) {
|
982
|
if (transferChancelSelector.isTransferWithWallet(interfaceType)) {
|
982
|
transferWithWalletAndAddSuccessTradeBills(logTag, tradeBills, orderCode, account, amount, transfer);
|
983
|
transferWithWalletAndAddSuccessTradeBills(logTag, tradeBills, orderCode, account, amount, transfer);
|
983
|
} else if (transferChancelSelector.isTransferWithAlipayExceedMillionTransfer(interfaceType)) {
|
984
|
} else if (transferChancelSelector.isTransferWithAlipayExceedMillionTransfer(interfaceType)) {
|
984
|
- transferWithAlipayExceedMillionTransfer(logTag, tradeBills, orderCode, account, amount, transfer);
|
985
|
+ transferWithAlipayExceedMillionTransfer(logTag, tradeBills, orderCode, account, amount, transfer,true);
|
985
|
} else {
|
986
|
} else {
|
986
|
transferWithAlipayTransferAndAddSuccessTradeBills(logTag, tradeBills, orderCode, account, amount, transfer);
|
987
|
transferWithAlipayTransferAndAddSuccessTradeBills(logTag, tradeBills, orderCode, account, amount, transfer);
|
987
|
}
|
988
|
}
|
|
@@ -1111,7 +1112,8 @@ public class PaymentServiceImpl implements IPaymentService { |
|
@@ -1111,7 +1112,8 @@ public class PaymentServiceImpl implements IPaymentService { |
1111
|
long orderCode,
|
1112
|
long orderCode,
|
1112
|
AuthorizeResultRespVO account,
|
1113
|
AuthorizeResultRespVO account,
|
1113
|
BigDecimal amount,
|
1114
|
BigDecimal amount,
|
1114
|
- OrdersPayTransfer transfer) {
|
1115
|
+ OrdersPayTransfer transfer,
|
|
|
1116
|
+ boolean isCheckTransferStatus) {
|
1115
|
String businessId = transfer.getId() + "_" + tradeBills.getId();
|
1117
|
String businessId = transfer.getId() + "_" + tradeBills.getId();
|
1116
|
TransferResult transferResult = alipayService.newAlipayExceedMillionTransfer(account.getUid())
|
1118
|
TransferResult transferResult = alipayService.newAlipayExceedMillionTransfer(account.getUid())
|
1117
|
.transferOrderCode(Long.toString(orderCode))
|
1119
|
.transferOrderCode(Long.toString(orderCode))
|
|
@@ -1121,6 +1123,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
@@ -1121,6 +1123,7 @@ public class PaymentServiceImpl implements IPaymentService { |
1121
|
.businessId(businessId)
|
1123
|
.businessId(businessId)
|
1122
|
.userName(account.getCertName())
|
1124
|
.userName(account.getCertName())
|
1123
|
.riskWatcher(Arrays.asList((uid, aar) -> shoppingRiskWatchDog.checkAlipayBlackUser(uid, aar)))
|
1125
|
.riskWatcher(Arrays.asList((uid, aar) -> shoppingRiskWatchDog.checkAlipayBlackUser(uid, aar)))
|
|
|
1126
|
+ .withTransferStatusQueryInterceptIf(isCheckTransferStatus)
|
1124
|
.transfer();
|
1127
|
.transfer();
|
1125
|
// success to wait
|
1128
|
// success to wait
|
1126
|
if (transferResult.getCode() == 200) {
|
1129
|
if (transferResult.getCode() == 200) {
|