## Opt - 调整退款失败后,退款表明细逻辑

This commit is contained in:
sangelxiu1 2025-07-04 16:45:58 +08:00
parent 96ce81eb46
commit b8c83cd383
1 changed files with 11 additions and 9 deletions

View File

@ -451,8 +451,6 @@ public class RefundServiceImpl implements IRefundService {
try {
JdPayRefundResponse response = jdPay.refund(request);
log.info("JdPayRefundResponse -> {}", JSONUtil.toJsonStr(response));
if ("0000".equals(response.getResultCode())) {
log.info("提交退款成功");
TOnlineRefund tOnlineRefund = new TOnlineRefund();
tOnlineRefund.setRefundCode(refundCode);
tOnlineRefund.setPkOnlinePayment(tOnlinePayment.getPkId());
@ -462,9 +460,13 @@ public class RefundServiceImpl implements IRefundService {
tOnlineRefund.setRefundNumber(response.getTradeNo());
tOnlineRefund.setPkCountry(1);
tOnlineRefund.setPkCreator(userId);
if ("0000".equals(response.getResultCode())) {
log.info("提交退款成功");
itOnlineRefundService.save(tOnlineRefund);
return "提交退款成功";
} else {
tOnlineRefund.setCallbackInfo(response.getResultDesc());
itOnlineRefundService.save(tOnlineRefund);
log.error("提交退款失败! {}", JSONUtil.toJsonStr(response));
return "提交退款失败!["+response.getResultDesc()+"]";
}