mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-06 12:39:38 +00:00
perf 一些微调
This commit is contained in:
@@ -157,7 +157,7 @@ public class AliPayCallbackService {
|
||||
public void resolveRefundData() {
|
||||
CallbackLocal callback = PaymentContextLocal.get().getCallbackInfo();
|
||||
Map<String, String> callbackParam = callback.getCallbackParam();
|
||||
// 退款订单Id
|
||||
// 退款订单号
|
||||
callback.setTradeNo(callbackParam.get(OUT_BIZ_NO));
|
||||
// 退款状态
|
||||
callback.setOutStatus(callbackParam.get(TRADE_STATUS));
|
||||
|
@@ -122,7 +122,7 @@ public class AliPayCloseService {
|
||||
}
|
||||
// 其他状态
|
||||
else {
|
||||
throw new TradeStatusErrorException("当前交易状态不支持关闭操作, 请对订单同步状态后再进行操作");
|
||||
throw new TradeStatusErrorException("当前交易无法关闭操作, 请对订单同步状态后再进行操作");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ public class ClientNoticeRecord extends MpCreateEntity implements EntityBaseFunc
|
||||
private Long taskId;
|
||||
|
||||
/** 请求次数 */
|
||||
@DbColumn(comment = "请求次数", length = 3, isNull = false)
|
||||
@DbColumn(comment = "请求次数", length = 3)
|
||||
private Integer reqCount;
|
||||
|
||||
/** 发送是否成功 */
|
||||
|
@@ -38,7 +38,7 @@ public class AliPayAllocationReceiverStrategy extends AbsAllocationReceiverStrat
|
||||
*/
|
||||
@Override
|
||||
public String getChannel() {
|
||||
return PayChannelEnum.WECHAT.getCode();
|
||||
return PayChannelEnum.ALI.getCode();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -3,6 +3,7 @@ package cn.daxpay.single.service.core.payment.close.service;
|
||||
import cn.bootx.platform.common.core.exception.RepetitiveOperationException;
|
||||
import cn.daxpay.single.core.code.PayStatusEnum;
|
||||
import cn.daxpay.single.core.exception.OperationFailException;
|
||||
import cn.daxpay.single.core.exception.PayFailureException;
|
||||
import cn.daxpay.single.core.exception.TradeNotExistException;
|
||||
import cn.daxpay.single.core.exception.TradeStatusErrorException;
|
||||
import cn.daxpay.single.core.param.payment.pay.PayCloseParam;
|
||||
@@ -85,6 +86,10 @@ public class PayCloseService {
|
||||
log.error("关闭订单失败:", e);
|
||||
// 记录关闭失败的记录
|
||||
this.saveRecord(payOrder, false, e.getMessage());
|
||||
result.setCode(1).setMsg(e.getMessage());
|
||||
if (e instanceof PayFailureException){
|
||||
throw e;
|
||||
}
|
||||
throw new OperationFailException("关闭订单失败");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user