perf 一些微调

This commit is contained in:
DaxPay
2024-06-26 19:43:37 +08:00
parent 5c274aa293
commit 3770a85a78
8 changed files with 15 additions and 7 deletions

View File

@@ -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));

View File

@@ -122,7 +122,7 @@ public class AliPayCloseService {
}
// 其他状态
else {
throw new TradeStatusErrorException("当前交易状态不支持关闭操作, 请对订单同步状态后再进行操作");
throw new TradeStatusErrorException("当前交易无法关闭操作, 请对订单同步状态后再进行操作");
}
}
}

View File

@@ -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;
/** 发送是否成功 */

View File

@@ -38,7 +38,7 @@ public class AliPayAllocationReceiverStrategy extends AbsAllocationReceiverStrat
*/
@Override
public String getChannel() {
return PayChannelEnum.WECHAT.getCode();
return PayChannelEnum.ALI.getCode();
}
/**

View File

@@ -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("关闭订单失败");
}
}