From 6e8329ef752d7a7f52edd7e756b103dfc9904cda Mon Sep 17 00:00:00 2001 From: Lcp <2767378157@qq.com> Date: Mon, 14 Oct 2024 11:28:45 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=91PAY=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=B2=A1=E6=9C=89=E8=BF=94=E5=9B=9E=E5=80=BC?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java | 4 +++- .../iocoder/yudao/module/pay/job/order/PayOrderExpireJob.java | 4 +++- .../iocoder/yudao/module/pay/job/order/PayOrderSyncJob.java | 4 +++- .../iocoder/yudao/module/pay/job/refund/PayRefundSyncJob.java | 4 +++- .../yudao/module/pay/job/transfer/PayTransferSyncJob.java | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java index b8d857b2a7..ab1b256bf9 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.pay.job.notify; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.tenant.core.job.TenantJob; import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; import com.xxl.job.core.handler.annotation.XxlJob; @@ -23,9 +24,10 @@ public class PayNotifyJob { @XxlJob("payNotifyJob") @TenantJob // 多租户 - public void execute() throws Exception { + public String execute() throws Exception { int notifyCount = payNotifyService.executeNotify(); log.info("[execute][执行支付通知 ({}) 个]", notifyCount); + return StrUtil.format("执行支付通知 ({}) 个",notifyCount); } } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderExpireJob.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderExpireJob.java index e341b7b72e..2e19d929f7 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderExpireJob.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderExpireJob.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.pay.job.order; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.tenant.core.job.TenantJob; import cn.iocoder.yudao.module.pay.service.order.PayOrderService; import com.xxl.job.core.handler.annotation.XxlJob; @@ -24,9 +25,10 @@ public class PayOrderExpireJob { @XxlJob("payOrderExpireJob") @TenantJob // 多租户 - public void execute(String param) { + public String execute(String param) { int count = orderService.expireOrder(); log.info("[execute][支付过期 ({}) 个]", count); + return StrUtil.format("支付过期 ({}) 个",count); } } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderSyncJob.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderSyncJob.java index bd247d0823..1b9506bd34 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderSyncJob.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/order/PayOrderSyncJob.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.pay.job.order; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.tenant.core.job.TenantJob; import cn.iocoder.yudao.module.pay.service.order.PayOrderService; import com.xxl.job.core.handler.annotation.XxlJob; @@ -35,10 +36,11 @@ public class PayOrderSyncJob { @XxlJob("payOrderSyncJob") @TenantJob // 多租户 - public void execute() { + public String execute() { LocalDateTime minCreateTime = LocalDateTime.now().minus(CREATE_TIME_DURATION_BEFORE); int count = orderService.syncOrder(minCreateTime); log.info("[execute][同步支付订单 ({}) 个]", count); + return StrUtil.format("同步支付订单 ({}) 个",count); } } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/refund/PayRefundSyncJob.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/refund/PayRefundSyncJob.java index 36a27b820e..b1cb0e8932 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/refund/PayRefundSyncJob.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/refund/PayRefundSyncJob.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.pay.job.refund; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.tenant.core.job.TenantJob; import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; import com.xxl.job.core.handler.annotation.XxlJob; @@ -24,9 +25,10 @@ public class PayRefundSyncJob { @XxlJob("payRefundSyncJob") @TenantJob // 多租户 - public void execute() { + public String execute() { int count = refundService.syncRefund(); log.info("[execute][同步退款订单 ({}) 个]", count); + return StrUtil.format("同步退款订单 ({}) 个",count); } } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/transfer/PayTransferSyncJob.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/transfer/PayTransferSyncJob.java index 23ff136999..263981e93d 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/transfer/PayTransferSyncJob.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/job/transfer/PayTransferSyncJob.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.pay.job.transfer; +import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.tenant.core.job.TenantJob; import cn.iocoder.yudao.module.pay.service.transfer.PayTransferService; import com.xxl.job.core.handler.annotation.XxlJob; @@ -23,8 +24,9 @@ public class PayTransferSyncJob { @XxlJob("payTransferSyncJob") @TenantJob // 多租户 - public void execute(String param) { + public String execute(String param) { int count = transferService.syncTransfer(); log.info("[execute][同步转账订单 ({}) 个]", count); + return StrUtil.format("同步转账订单 ({}) 个",count); } }