...
|
...
|
@@ -678,7 +678,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
logger.info("transferMon uid {} 支付宝账号uid无值使用账号{}", targetUid, account.getAlipayAccount());
|
|
|
transfer.setAlipayAccount(account.getAlipayAccount());
|
|
|
}
|
|
|
|
|
|
transfer.setUpdateTime(now);
|
|
|
tradeBillsMapper.insert(record);
|
|
|
|
|
|
String alipayAccount = transfer.getAlipayAccount();
|
...
|
...
|
@@ -690,6 +690,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
|
|
|
if(exceedMillion()) {
|
|
|
transfer.setInterfaceType(2);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
Map<String, String> mapResult = transferWhenExceedMillion(transfer.getId(), record, buyerOrderCode, account, transferAmount, now);
|
|
|
String resultStr = JSON.toJSONString(mapResult);
|
|
|
jsonObject = JSON.parseObject(resultStr);
|
...
|
...
|
@@ -702,6 +703,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
}
|
|
|
|
|
|
transfer.setInterfaceType(1);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
jsonObject = alipayService.transferMoney(Long.toString(buyerOrderCode), account.getAlipayId(), account.getAlipayAccount(), transferAmount);
|
|
|
if (jsonObject == null) {
|
|
|
logger.warn("transferMonErr 转账失败 , orderCode is {}", buyerOrderCode);
|
...
|
...
|
@@ -721,6 +723,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
transfer.setStatus(1);
|
|
|
} else if(exceedMillion(jsonObject)) {
|
|
|
transfer.setInterfaceType(2);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
Map<String, String> mapResult = transferWhenExceedMillion(transfer.getId(), record, buyerOrderCode, account, transferAmount, now);
|
|
|
String resultStr = JSON.toJSONString(mapResult);
|
|
|
jsonObject = JSON.parseObject(resultStr);
|
...
|
...
|
@@ -754,7 +757,6 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
return;
|
|
|
}
|
|
|
logger.info("transferMon最后更新状态 status= {}", transfer.getStatus());
|
|
|
transfer.setUpdateTime(now);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
// 100:成功;201:没有支付宝账号;202:金额不合法;299:转账失败
|
|
|
record.setTradeStatus(transfer.getStatus() == 1 ? 100 : 299);
|
...
|
...
|
@@ -812,11 +814,13 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
// 转账
|
|
|
JSONObject jsonObject = null;
|
|
|
boolean exceedMillionAndSuccess = false;
|
|
|
transfer.setUpdateTime(now);
|
|
|
try {
|
|
|
logger.info("transAllEarnest开始调用阿里接口参数buyerOrderCode={}, alipayAccount={}, transferAmount={}", orderCode, account, amount);
|
|
|
|
|
|
if(exceedMillion()) {
|
|
|
transfer.setInterfaceType(2);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
Map<String, String> mapResult = transferWhenExceedMillion(transfer.getId(), record, orderCode, aliPayAccount, amount, now);
|
|
|
String resultStr = JSON.toJSONString(mapResult);
|
|
|
jsonObject = JSON.parseObject(resultStr);
|
...
|
...
|
@@ -829,6 +833,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
}
|
|
|
|
|
|
transfer.setInterfaceType(1);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
jsonObject = alipayService.transferMoney(Long.toString(orderCode), aliPayAccount.getAlipayId(), aliPayAccount.getAlipayAccount(), amount);
|
|
|
if (jsonObject == null) {
|
|
|
logger.warn("transAllEarnestErr 转账失败 , orderCode is {}", orderCode);
|
...
|
...
|
@@ -849,6 +854,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
return true;
|
|
|
} else if(exceedMillion(jsonObject)) {
|
|
|
transfer.setInterfaceType(2);
|
|
|
ordersPayTransferMapper.updateByPrimaryKeySelective(transfer);
|
|
|
Map<String, String> mapResult = transferWhenExceedMillion(transfer.getId(), record, orderCode, aliPayAccount, amount, now);
|
|
|
String resultStr = JSON.toJSONString(mapResult);
|
|
|
jsonObject = JSON.parseObject(resultStr);
|
...
|
...
|
@@ -1086,11 +1092,14 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
}
|
|
|
interfaceType = transfer.getInterfaceType();
|
|
|
|
|
|
logger.info("manualDeal orderCode={}, tradeBillId={}, 转账接口类型为 {}", orderCode, tradeBillsId, interfaceType);
|
|
|
if (interfaceType != null && interfaceType == 2) {
|
|
|
logger.info("manualDeal orderCode={}, tradeBillId={}, 转账接口类型为 超过100万的接口", orderCode, tradeBillsId);
|
|
|
transferWhenExceedMillion(transfer.getId(), preSuccess, orderCode, account, amount, now);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
logger.info("manualDeal orderCode={}, tradeBillId={}, 转账接口类型为 小于100万的接口", orderCode, tradeBillsId);
|
|
|
jsonObject = alipayService.transferMoney(Long.toString(orderCode), account.getAlipayId(), account.getAlipayAccount(), amount);
|
|
|
if (jsonObject == null) {
|
|
|
logger.warn("manualDeal 转账失败 , req is {}", req);
|
...
|
...
|
|