From 045193cf433d3d129d8fea237235425239141f47 Mon Sep 17 00:00:00 2001 From: bootx Date: Thu, 29 Feb 2024 00:00:14 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=AF=B9=E8=B4=A6=E5=B7=AE=E5=BC=82?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dao/PayReconcileDiffRecordManager.java | 18 ++++++ .../dao/PayReconcileDiffRecordMapper.java | 14 +++++ .../reconcile/entity/PayReconcileDetail.java | 2 +- .../entity/PayReconcileDiffRecord.java | 60 +++++++++++++++++++ .../service/ClientNoticeAssistService.java | 4 +- .../notice/service/ClientNoticeService.java | 2 +- .../notice/entity/ClientNoticeRecord.java | 2 +- .../task/notice/entity/ClientNoticeTask.java | 12 +++- 8 files changed, 108 insertions(+), 6 deletions(-) create mode 100644 daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/dao/PayReconcileDiffRecordManager.java create mode 100644 daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/dao/PayReconcileDiffRecordMapper.java create mode 100644 daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/entity/PayReconcileDiffRecord.java diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/dao/PayReconcileDiffRecordManager.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/dao/PayReconcileDiffRecordManager.java new file mode 100644 index 000000000..4277e7c18 --- /dev/null +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/dao/PayReconcileDiffRecordManager.java @@ -0,0 +1,18 @@ +package cn.bootx.platform.daxpay.service.core.order.reconcile.dao; + +import cn.bootx.platform.common.mybatisplus.impl.BaseManager; +import cn.bootx.platform.daxpay.service.core.order.reconcile.entity.PayReconcileDiffRecord; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Repository; + +/** + * + * @author xxm + * @since 2024/2/28 + */ +@Slf4j +@Repository +@RequiredArgsConstructor +public class PayReconcileDiffRecordManager extends BaseManager { +} diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/dao/PayReconcileDiffRecordMapper.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/dao/PayReconcileDiffRecordMapper.java new file mode 100644 index 000000000..1fec857de --- /dev/null +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/dao/PayReconcileDiffRecordMapper.java @@ -0,0 +1,14 @@ +package cn.bootx.platform.daxpay.service.core.order.reconcile.dao; + +import cn.bootx.platform.daxpay.service.core.order.reconcile.entity.PayReconcileDiffRecord; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 对账差异单 + * @author xxm + * @since 2024/2/28 + */ +@Mapper +public interface PayReconcileDiffRecordMapper extends BaseMapper { +} diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/entity/PayReconcileDetail.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/entity/PayReconcileDetail.java index b134a90e5..c92913028 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/entity/PayReconcileDetail.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/entity/PayReconcileDetail.java @@ -48,7 +48,7 @@ public class PayReconcileDetail extends MpCreateEntity implements EntityBaseFunc private String orderId; /** 支付订单ID */ - @DbColumn(comment = "本地订单ID") + @DbColumn(comment = "支付订单ID") private String paymentId; /** 本地退款ID */ diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/entity/PayReconcileDiffRecord.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/entity/PayReconcileDiffRecord.java new file mode 100644 index 000000000..1edbcee96 --- /dev/null +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/order/reconcile/entity/PayReconcileDiffRecord.java @@ -0,0 +1,60 @@ +package cn.bootx.platform.daxpay.service.core.order.reconcile.entity; + +import cn.bootx.platform.common.mybatisplus.base.MpBaseEntity; +import cn.bootx.table.modify.annotation.DbColumn; +import cn.bootx.table.modify.annotation.DbTable; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.time.LocalDateTime; + +/** + * 对账差异单 + * @author xxm + * @since 2024/2/28 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@Accessors(chain = true) +@DbTable(comment = "对账差异单") +@TableName("pay_reconcile_diff_record") +public class PayReconcileDiffRecord extends MpBaseEntity { + + /** 对账单ID */ + @DbColumn(comment = "对账单ID") + private Long recordId; + + /** 对账单明细ID */ + @DbColumn(comment = "对账单明细ID") + private Long detailId; + + /** 本地订单id */ + @DbColumn(comment = "本地订单id") + private Long orderId; + + /** 订单标题 */ + @DbColumn(comment = "订单标题") + private String title; + + /** 订单类型 */ + @DbColumn(comment = "订单类型") + private String orderType; + + /** 差异类型 */ + @DbColumn(comment = "差异类型") + private String diffType; + + /** 网关订单号 */ + @DbColumn(comment = "网关订单号") + private String gatewayOrderNo; + + /** 交易金额 */ + @DbColumn(comment = "交易金额") + private Integer amount; + + /** 订单时间 */ + @DbColumn(comment = "订单时间") + private LocalDateTime orderTime; +} diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/notice/service/ClientNoticeAssistService.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/notice/service/ClientNoticeAssistService.java index 874d61566..6d75380c6 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/notice/service/ClientNoticeAssistService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/notice/service/ClientNoticeAssistService.java @@ -73,7 +73,7 @@ public class ClientNoticeAssistService { .setUrl(orderExtra.getNotifyUrl()) // 时间序列化进行了重写 .setContent(JacksonUtil.toJson(payNoticeResult)) - .setType(ClientNoticeTypeEnum.PAY.getType()) + .setNoticeType(ClientNoticeTypeEnum.PAY.getType()) .setSendCount(0) .setOrderId(order.getId()); } @@ -113,7 +113,7 @@ public class ClientNoticeAssistService { .setUrl(orderExtra.getNotifyUrl()) // 时间序列化进行了重写 .setContent(JacksonUtil.toJson(payNoticeResult)) - .setType(ClientNoticeTypeEnum.REFUND.getType()) + .setNoticeType(ClientNoticeTypeEnum.REFUND.getType()) .setSendCount(0) .setOrderId(order.getId()); } diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/notice/service/ClientNoticeService.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/notice/service/ClientNoticeService.java index a9dd68f54..9ccf50847 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/notice/service/ClientNoticeService.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/payment/notice/service/ClientNoticeService.java @@ -219,7 +219,7 @@ public class ClientNoticeService { // 创建记录 ClientNoticeRecord record = new ClientNoticeRecord() .setTaskId(task.getId()) - .setType(ClientNoticeSendTypeEnum.AUTO.getType()) + .setSendType(ClientNoticeSendTypeEnum.AUTO.getType()) .setReqCount(task.getSendCount()+1); String body = null; try { diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/task/notice/entity/ClientNoticeRecord.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/task/notice/entity/ClientNoticeRecord.java index 1b1a4616f..2ca3a2825 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/task/notice/entity/ClientNoticeRecord.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/task/notice/entity/ClientNoticeRecord.java @@ -41,7 +41,7 @@ public class ClientNoticeRecord extends MpCreateEntity implements EntityBaseFunc * @see ClientNoticeSendTypeEnum */ @DbColumn(comment = "发送类型") - private String type; + private String sendType; /** 错误信息 */ @DbColumn(comment = "错误信息") diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/task/notice/entity/ClientNoticeTask.java b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/task/notice/entity/ClientNoticeTask.java index e471beee3..936d7f688 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/task/notice/entity/ClientNoticeTask.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/bootx/platform/daxpay/service/core/task/notice/entity/ClientNoticeTask.java @@ -2,6 +2,8 @@ package cn.bootx.platform.daxpay.service.core.task.notice.entity; import cn.bootx.platform.common.core.function.EntityBaseFunction; import cn.bootx.platform.common.mybatisplus.base.MpBaseEntity; +import cn.bootx.platform.daxpay.code.PayStatusEnum; +import cn.bootx.platform.daxpay.code.RefundStatusEnum; import cn.bootx.platform.daxpay.service.code.ClientNoticeTypeEnum; import cn.bootx.platform.daxpay.service.core.task.notice.convert.ClientNoticeConvert; import cn.bootx.platform.daxpay.service.dto.record.notice.ClientNoticeTaskDto; @@ -37,7 +39,15 @@ public class ClientNoticeTask extends MpBaseEntity implements EntityBaseFunction * @see ClientNoticeTypeEnum */ @DbColumn(comment = "消息类型") - private String type; + private String noticeType; + + /** + * 订单类型 + * @see PayStatusEnum + * @see RefundStatusEnum + */ + @DbColumn(comment = "订单类型") + private String orderStatus; /** 消息内容 */ @DbColumn(comment = "消息内容")