From 034cedfbde8bda79b1806766030bd6556c728180 Mon Sep 17 00:00:00 2001 From: xxm1995 Date: Thu, 14 Mar 2024 19:23:19 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=80=80=E6=AC=BE=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E9=99=90?= =?UTF-8?q?=E5=AE=9A=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/core/channel/union/entity/UnionPayRecord.java | 3 ++- .../service/core/order/refund/dao/RefundOrderManager.java | 4 ++-- .../reconcile/strategy/UnionPayReconcileStrategy.java | 5 +++++ .../service/core/payment/sync/service/RefundSyncService.java | 2 +- .../daxpay/service/task/service/RefundSyncTaskService.java | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/union/entity/UnionPayRecord.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/union/entity/UnionPayRecord.java index 6e30e3249..46a89d0d3 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/union/entity/UnionPayRecord.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/channel/union/entity/UnionPayRecord.java @@ -3,6 +3,7 @@ package cn.bootx.platform.daxpay.service.core.channel.union.entity; import cn.bootx.platform.common.core.function.EntityBaseFunction; import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity; import cn.bootx.platform.daxpay.service.code.UnionPayRecordTypeEnum; +import cn.bootx.platform.daxpay.service.core.channel.union.convert.UnionPayConvert; import cn.bootx.platform.daxpay.service.dto.channel.union.UnionPayRecordDto; import cn.bootx.table.modify.annotation.DbColumn; import cn.bootx.table.modify.annotation.DbTable; @@ -57,6 +58,6 @@ public class UnionPayRecord extends MpCreateEntity implements EntityBaseFunction */ @Override public UnionPayRecordDto toDto() { - return null; + return UnionPayConvert.CONVERT.convert(this); } } diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/dao/RefundOrderManager.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/dao/RefundOrderManager.java index 3de8c6975..6c01e1df7 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/dao/RefundOrderManager.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/refund/dao/RefundOrderManager.java @@ -56,8 +56,8 @@ public class RefundOrderManager extends BaseManager findAllByProgress() { LocalDateTime now = LocalDateTime.now(); return lambdaQuery() - .le(RefundOrder::getRefundTime,now) - .eq(RefundOrder::getStatus, RefundStatusEnum.PROGRESS) + .le(RefundOrder::getCreateTime,now) + .eq(RefundOrder::getStatus, RefundStatusEnum.PROGRESS.getCode()) .list(); } } diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/reconcile/strategy/UnionPayReconcileStrategy.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/reconcile/strategy/UnionPayReconcileStrategy.java index 4ddd151d7..3184551c7 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/reconcile/strategy/UnionPayReconcileStrategy.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/reconcile/strategy/UnionPayReconcileStrategy.java @@ -3,6 +3,7 @@ package cn.bootx.platform.daxpay.service.core.payment.reconcile.strategy; import cn.bootx.platform.common.core.util.LocalDateTimeUtil; import cn.bootx.platform.common.sequence.func.Sequence; import cn.bootx.platform.daxpay.code.PayChannelEnum; +import cn.bootx.platform.daxpay.exception.pay.PayFailureException; import cn.bootx.platform.daxpay.service.core.channel.union.convert.UnionPayConvert; import cn.bootx.platform.daxpay.service.core.channel.union.dao.UnionPayRecordManager; import cn.bootx.platform.daxpay.service.core.channel.union.entity.UnionPayConfig; @@ -75,6 +76,10 @@ public class UnionPayReconcileStrategy extends AbsReconcileStrategy { */ @Override public void downAndSave() { + if (true){ + throw new PayFailureException("功能暂时未实现"); + } + Date date = DateUtil.date(this.getRecordOrder().getDate()); reconcileService.downAndSave(date, this.getRecordOrder().getId(), this.unionPayKit); } diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/sync/service/RefundSyncService.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/sync/service/RefundSyncService.java index 4fd389989..31f36c505 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/sync/service/RefundSyncService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/sync/service/RefundSyncService.java @@ -103,7 +103,7 @@ public class RefundSyncService { refundOrder.setGatewayOrderNo(syncResult.getGatewayOrderNo()); refundOrderManager.updateById(refundOrder); } - // 判断网关状态是否和支付单一致, 同时特定情况下更新网关同步状态 + // 判断网关状态是否和支付单一致 boolean statusSync = this.checkSyncStatus(syncResult, refundOrder); RefundRepairResult repairResult = new RefundRepairResult(); try { diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/task/service/RefundSyncTaskService.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/task/service/RefundSyncTaskService.java index 7054a2bbe..fb6ca682f 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/task/service/RefundSyncTaskService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/task/service/RefundSyncTaskService.java @@ -35,6 +35,7 @@ public class RefundSyncTaskService { refundSyncService.syncRefundOrder(refundOrder); } catch (Exception e) { log.warn("退款执行同步失败, ID: {}",refundOrder.getId()); + log.warn("退款执行同步失败",e); } } }