...
|
...
|
@@ -152,7 +152,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
BuyerOrderPayDiffTimeHandler buyerOrderPayDiffTimeHandler;
|
|
|
|
|
|
@Autowired
|
|
|
private TransferChancelSelector alipayTransferChancelSelector;
|
|
|
private TransferChancelSelector transferChancelSelector;
|
|
|
|
|
|
@Autowired
|
|
|
private TradeBillsService tradeBillsService;
|
...
|
...
|
@@ -522,11 +522,11 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
try {
|
|
|
logger.info("{}, transfer alipayAccount={}, transferAmount={}", logTag, alipayAccount, transferAmount);
|
|
|
|
|
|
if (alipayTransferChancelSelector.isTransferWithWallet(record)) {
|
|
|
if (transferChancelSelector.isTransferWithWallet(record)) {
|
|
|
transfer.setInterfaceType(INTERFACE_TYPE_TRANSFER_WALLET);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
transferWithWallet(logTag, record, buyerOrderCode, account, transferAmount, transfer);
|
|
|
} else if (alipayTransferChancelSelector.isTransferWithAlipayExceedMillionTransfer()) {
|
|
|
} else if (transferChancelSelector.isTransferWithAlipayExceedMillionTransfer()) {
|
|
|
transfer.setInterfaceType(INTERFACE_TYPE_TRANSFER_WHEN_EXCEED_MILLION);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
transferWithAlipayExceedMillionTransfer(logTag, record, buyerOrderCode, account, transferAmount, transfer);
|
...
|
...
|
@@ -609,7 +609,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
boolean exceedMillionAndSuccess = false;
|
|
|
transfer.setUpdateTime(now);
|
|
|
try {
|
|
|
if (alipayTransferChancelSelector.isTransferWithWallet(record)) {
|
|
|
if (transferChancelSelector.isTransferWithWallet(record)) {
|
|
|
transfer.setInterfaceType(INTERFACE_TYPE_TRANSFER_WALLET);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
TransferResult transferResult = walletTransferService.transfer(logTag, record);
|
...
|
...
|
@@ -625,7 +625,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
logger.info("{}, transfer start", logTag);
|
|
|
shoppingRiskWatchDog.checkAlipayBlackUser(aliPayAccount.getUid(), aliPayAccount);
|
|
|
shoppingRiskWatchDog.checkManualStopAlipayTransfer();
|
|
|
if (alipayTransferChancelSelector.isTransferWithAlipayExceedMillionTransfer()) {
|
|
|
if (transferChancelSelector.isTransferWithAlipayExceedMillionTransfer()) {
|
|
|
transfer.setInterfaceType(INTERFACE_TYPE_TRANSFER_WHEN_EXCEED_MILLION);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
Map<String, String> mapResult = transferWhenExceedMillion(transfer.getId(), record, orderCode, aliPayAccount, amount, now);
|
...
|
...
|
@@ -659,7 +659,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
transfer.setAlipayTradeId(orderId);
|
|
|
transfer.setStatus(1);
|
|
|
return true;
|
|
|
} else if (alipayTransferChancelSelector.isExceedMillion(jsonObject)) {
|
|
|
} else if (transferChancelSelector.isExceedMillion(jsonObject)) {
|
|
|
transfer.setInterfaceType(INTERFACE_TYPE_TRANSFER_WHEN_EXCEED_MILLION);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
Map<String, String> mapResult = transferWhenExceedMillion(transfer.getId(), record, orderCode, aliPayAccount, amount, now);
|
...
|
...
|
@@ -916,9 +916,9 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
400, "转账记录已成功转账,请不要重复操作。");
|
|
|
Integer interfaceType = transfer.getInterfaceType();
|
|
|
logger.info("{}, transfer channel router {}", logTag, interfaceType);
|
|
|
if (alipayTransferChancelSelector.isTransferWithWallet(interfaceType)) {
|
|
|
if (transferChancelSelector.isTransferWithWallet(interfaceType)) {
|
|
|
transferWithWalletAndAddSuccessTradeBills(logTag, tradeBills, orderCode, account, amount, transfer);
|
|
|
} else if (alipayTransferChancelSelector.isTransferWithAlipayExceedMillionTransfer(interfaceType)) {
|
|
|
} else if (transferChancelSelector.isTransferWithAlipayExceedMillionTransfer(interfaceType)) {
|
|
|
transferWithAlipayExceedMillionTransfer(logTag, tradeBills, orderCode, account, amount, transfer);
|
|
|
} else {
|
|
|
transferWithAlipayTransferAndAddSuccessTradeBills(logTag, tradeBills, orderCode, account, amount, transfer);
|
...
|
...
|
@@ -1031,7 +1031,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
transferSuccess.setUpdateTime(DateUtil.getCurrentTimeSecond());
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transferSuccess);
|
|
|
} else {
|
|
|
alipayTransferChancelSelector.isExceedMillion(transferResult);
|
|
|
transferChancelSelector.isExceedMillion(transferResult);
|
|
|
logger.warn("{}, transfer fail {}", logTag, transferResult);
|
|
|
recordTransferFailResult(transfer, transferResult);
|
|
|
throwServiceException(transferResult.getCode(), transferResult.getMsg());
|
...
|
...
|
|