记得上下班打卡 | git大法好,push需谨慎

Commit 1d1bcbb7 authored by zhoujianping's avatar zhoujianping

1.支付宝小程序退款接口增加退款日志

parent a48cc5bc
...@@ -543,6 +543,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService ...@@ -543,6 +543,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
//支付宝退款接口 //支付宝退款接口
public DragonRefundChannelDto aliPayRefund(String orderRefundId, String refundCode, String code, String reason, BigDecimal price, String paymentId, String paymentType, LocalDateTime nowTime) { public DragonRefundChannelDto aliPayRefund(String orderRefundId, String refundCode, String code, String reason, BigDecimal price, String paymentId, String paymentType, LocalDateTime nowTime) {
log.info("支付宝退款入参orderRefundId={},refundCode={},code={},reason={},price={},paymentId={},paymentType={}",orderRefundId,refundCode,code,reason,price,paymentId,paymentType);
String refundStatus; String refundStatus;
DragonRefundChannelDto channelDto = new DragonRefundChannelDto(); DragonRefundChannelDto channelDto = new DragonRefundChannelDto();
RefundContentDto contentDto = new RefundContentDto(); RefundContentDto contentDto = new RefundContentDto();
...@@ -563,7 +564,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService ...@@ -563,7 +564,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
httpClient=PayAlipayUtils.getInstance().getHttpClient(); httpClient=PayAlipayUtils.getInstance().getHttpClient();
} }
AlipayTradeRefundResponse response = httpClient.execute(request); AlipayTradeRefundResponse response = httpClient.execute(request);
log.info("支付宝退款AlipayTradeRefundResponse={}",response); log.info("支付宝退款AlipayTradeRefundResponse={}",response.getBody());
if (response.getFundChange() == null || response.getFundChange().equals("N")) { if (response.getFundChange() == null || response.getFundChange().equals("N")) {
try { try {
refundStatus = DragonConstant.RefundStatusEnum.STATUS_ERROR.getCode(); refundStatus = DragonConstant.RefundStatusEnum.STATUS_ERROR.getCode();
...@@ -605,12 +606,14 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService ...@@ -605,12 +606,14 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
); );
try { try {
String refundAt = ""; String refundAt = "";
log.info("支付宝退款FundChange={}",response.getFundChange());
if (response.getFundChange().equals("Y")) { if (response.getFundChange().equals("Y")) {
refundStatus = DragonConstant.RefundStatusEnum.STATUS_REFUNDED.getCode(); refundStatus = DragonConstant.RefundStatusEnum.STATUS_REFUNDED.getCode();
refundAt = DateUtil.format(response.getGmtRefundPay(), DateUtil.Formatter.yyyyMMddHHmmss); refundAt = DateUtil.format(response.getGmtRefundPay(), DateUtil.Formatter.yyyyMMddHHmmss);
} else { } else {
refundStatus = DragonConstant.RefundStatusEnum.STATUS_REFUNDING.getCode(); refundStatus = DragonConstant.RefundStatusEnum.STATUS_REFUNDING.getCode();
} }
log.info("支付宝退款成功code={},refundStatus={}",code,refundStatus);
mqHandleUtil.sendMySqlRedis( mqHandleUtil.sendMySqlRedis(
SqlMapping.get("dragon_order_refund_success.update"), SqlMapping.get("dragon_order_refund_success.update"),
new Object[]{nowTime, refundAt, refundStatus, code}, new Object[]{nowTime, refundAt, refundStatus, code},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment