...
|
...
|
@@ -610,6 +610,9 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
if (tradeBills.getTradeStatus() == 100) {
|
|
|
throw new ServiceException(400, "manualDeal:该流水不是失败的");
|
|
|
}
|
|
|
if (tradeBills.getIncomeOutcome()==null || tradeBills.getIncomeOutcome()!=1) {
|
|
|
throw new ServiceException(400, "manualDeal:该流水不是退款类型");
|
|
|
}
|
|
|
// 查询处理过的
|
|
|
if (tradeBillsMapper.selectByDealRelateId(tradeBillsId) != null) {
|
|
|
throw new ServiceException(400, "manualDeal:该流水已经处理过");
|
...
|
...
|
@@ -630,7 +633,6 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
}
|
|
|
|
|
|
int now = (int) (System.currentTimeMillis() / 1000);
|
|
|
int beforeStatus = tradeBills.getTradeStatus();
|
|
|
// 预标记成功
|
|
|
TradeBills preSuccess = new TradeBills();
|
|
|
preSuccess.setId(tradeBills.getId());
|
...
|
...
|
@@ -672,8 +674,11 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
}
|
|
|
try {
|
|
|
OrdersPayTransfer transfer = ordersPayTransferMapper.selectByBuyerOrderCode(orderCode);
|
|
|
if (transfer == null) {
|
|
|
throw new ServiceException(400, "转账记录不存在,流水id=" + tradeBillsId);
|
|
|
}
|
|
|
if (transfer == null || transfer.getStatus() == 1) {
|
|
|
throw new ServiceException(400, "转账记录不存在或者已成功转账,取消转账,流水id=" + tradeBillsId);
|
|
|
throw new ServiceException(400, "转账记录已成功转账,流水id=" + tradeBillsId);
|
|
|
}
|
|
|
|
|
|
JSONObject jsonObject = alipayService.transferMoney(Long.toString(orderCode), alipayAccount, amount);
|
...
|
...
|
|