diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/notice/entity/ClientNoticeRecord.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/notice/entity/ClientNoticeRecord.java index a1774fe1..cba2d2c2 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/notice/entity/ClientNoticeRecord.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/notice/entity/ClientNoticeRecord.java @@ -2,6 +2,7 @@ package cn.daxpay.single.service.core.notice.entity; import cn.bootx.platform.common.core.function.EntityBaseFunction; import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity; +import cn.bootx.table.modify.mysql.annotation.DbMySqlIndex; import cn.daxpay.single.service.code.ClientNoticeSendTypeEnum; import cn.daxpay.single.service.core.notice.convert.ClientNoticeConvert; import cn.daxpay.single.service.dto.record.notice.ClientNoticeRecordDto; @@ -25,30 +26,31 @@ import lombok.experimental.Accessors; public class ClientNoticeRecord extends MpCreateEntity implements EntityBaseFunction { /** 任务ID */ - @DbColumn(comment = "任务ID") + @DbMySqlIndex(comment = "任务ID索引") + @DbColumn(comment = "任务ID", isNull = false) private Long taskId; /** 请求次数 */ - @DbColumn(comment = "请求次数") + @DbColumn(comment = "请求次数", length = 3, isNull = false) private Integer reqCount; /** 发送是否成功 */ - @DbColumn(comment = "发送是否成功") + @DbColumn(comment = "发送是否成功", isNull = false) private boolean success; /** * 发送类型, 自动发送, 手动发送 * @see ClientNoticeSendTypeEnum */ - @DbColumn(comment = "发送类型") + @DbColumn(comment = "发送类型", length = 20, isNull = false) private String sendType; - /** 错误编码 */ - @DbColumn(comment = "错误编码") + /** 错误码 */ + @DbColumn(comment = "错误码", length = 10) private String errorCode; /** 错误信息 */ - @DbColumn(comment = "错误信息") + @DbColumn(comment = "错误信息", length = 150) private String errorMsg; /** diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/notice/entity/ClientNoticeTask.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/notice/entity/ClientNoticeTask.java index 6e251341..c8a06d98 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/notice/entity/ClientNoticeTask.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/notice/entity/ClientNoticeTask.java @@ -5,14 +5,15 @@ import cn.bootx.platform.common.mybatisplus.base.MpBaseEntity; import cn.bootx.table.modify.annotation.DbColumn; import cn.bootx.table.modify.annotation.DbTable; import cn.bootx.table.modify.mysql.annotation.DbMySqlFieldType; +import cn.bootx.table.modify.mysql.annotation.DbMySqlIndex; import cn.bootx.table.modify.mysql.constants.MySqlFieldTypeEnum; import cn.daxpay.single.code.PayStatusEnum; import cn.daxpay.single.code.RefundStatusEnum; import cn.daxpay.single.result.order.AllocOrderResult; import cn.daxpay.single.service.code.ClientNoticeTypeEnum; +import cn.daxpay.single.service.core.notice.convert.ClientNoticeConvert; import cn.daxpay.single.service.core.payment.notice.result.PayNoticeResult; import cn.daxpay.single.service.core.payment.notice.result.RefundNoticeResult; -import cn.daxpay.single.service.core.notice.convert.ClientNoticeConvert; import cn.daxpay.single.service.dto.record.notice.ClientNoticeTaskDto; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -34,18 +35,19 @@ import java.time.LocalDateTime; public class ClientNoticeTask extends MpBaseEntity implements EntityBaseFunction { /** 本地交易ID */ - @DbColumn(comment = "本地交易ID") + @DbColumn(comment = "本地交易ID", isNull = false) private Long tradeId; /** 本地交易号 */ - @DbColumn(comment = "本地交易号") + @DbMySqlIndex(comment = "本地交易号索引") + @DbColumn(comment = "本地交易号", length = 32, isNull = false) private String tradeNo; /** * 消息类型 * @see ClientNoticeTypeEnum */ - @DbColumn(comment = "消息类型") + @DbColumn(comment = "消息类型", length = 20, isNull = false) private String noticeType; /** @@ -53,7 +55,7 @@ public class ClientNoticeTask extends MpBaseEntity implements EntityBaseFunction * @see PayStatusEnum * @see RefundStatusEnum */ - @DbColumn(comment = "交易状态") + @DbColumn(comment = "交易状态", length = 20, isNull = false) private String tradeStatus; /** @@ -62,24 +64,24 @@ public class ClientNoticeTask extends MpBaseEntity implements EntityBaseFunction * @see RefundNoticeResult * @see AllocOrderResult */ - @DbColumn(comment = "消息内容") + @DbColumn(comment = "消息内容", isNull = false) @DbMySqlFieldType(MySqlFieldTypeEnum.LONGTEXT) private String content; /** 是否发送成功 */ - @DbColumn(comment = "是否发送成功") + @DbColumn(comment = "是否发送成功", isNull = false) private boolean success; /** 发送次数 */ - @DbColumn(comment = "发送次数") + @DbColumn(comment = "发送次数", length = 3, isNull = false) private Integer sendCount; /** 发送地址 */ - @DbColumn(comment = "发送地址") + @DbColumn(comment = "发送地址", length = 150, isNull = false) private String url; /** 最后发送时间 */ - @DbColumn(comment = "最后发送时间") + @DbColumn(comment = "最后发送时间", isNull = false) private LocalDateTime latestTime; /** diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/order/reconcile/entity/ReconcileFile.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/order/reconcile/entity/ReconcileFile.java index 22b0495e..c81a3b22 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/order/reconcile/entity/ReconcileFile.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/order/reconcile/entity/ReconcileFile.java @@ -1,6 +1,7 @@ package cn.daxpay.single.service.core.order.reconcile.entity; import cn.bootx.platform.common.mybatisplus.base.MpIdEntity; +import cn.bootx.table.modify.mysql.annotation.DbMySqlIndex; import cn.daxpay.single.service.code.ReconcileFileTypeEnum; import cn.bootx.table.modify.annotation.DbColumn; import cn.bootx.table.modify.annotation.DbTable; @@ -21,16 +22,17 @@ import lombok.experimental.Accessors; @TableName("pay_reconcile_file") public class ReconcileFile extends MpIdEntity { - @DbColumn(comment = "对账单ID") + @DbMySqlIndex(comment = "对账单ID索引") + @DbColumn(comment = "对账单ID", isNull = false) private Long reconcileId; /** * 明细/汇总 * @see ReconcileFileTypeEnum */ - @DbColumn(comment = "类型") + @DbColumn(comment = "类型", length = 20, isNull = false) private String type; - @DbColumn(comment = "对账单文件") + @DbColumn(comment = "对账单文件", isNull = false) private Long fileId; } diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/order/reconcile/entity/ReconcileOutTrade.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/order/reconcile/entity/ReconcileOutTrade.java index 4a0f195d..40d48aa1 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/order/reconcile/entity/ReconcileOutTrade.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/order/reconcile/entity/ReconcileOutTrade.java @@ -2,6 +2,7 @@ package cn.daxpay.single.service.core.order.reconcile.entity; import cn.bootx.platform.common.core.function.EntityBaseFunction; import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity; +import cn.bootx.table.modify.mysql.annotation.DbMySqlIndex; import cn.daxpay.single.service.code.PaymentTypeEnum; import cn.daxpay.single.service.core.order.reconcile.conver.ReconcileConvert; import cn.daxpay.single.service.dto.order.reconcile.ReconcileOutTradeDto; @@ -27,6 +28,7 @@ import java.time.LocalDateTime; public class ReconcileOutTrade extends MpCreateEntity implements EntityBaseFunction { /** 关联对账订单ID */ + @DbMySqlIndex(comment = "对账单ID索引") @DbColumn(comment = "关联对账订单ID") private Long reconcileId; diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/callback/entity/PayCallbackRecord.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/callback/entity/PayCallbackRecord.java index 9a26d6b5..4abc28b0 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/callback/entity/PayCallbackRecord.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/callback/entity/PayCallbackRecord.java @@ -2,17 +2,17 @@ package cn.daxpay.single.service.core.record.callback.entity; import cn.bootx.platform.common.core.function.EntityBaseFunction; import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity; +import cn.bootx.table.modify.annotation.DbColumn; +import cn.bootx.table.modify.annotation.DbTable; +import cn.bootx.table.modify.mysql.annotation.DbMySqlFieldType; +import cn.bootx.table.modify.mysql.annotation.DbMySqlIndex; +import cn.bootx.table.modify.mysql.constants.MySqlFieldTypeEnum; import cn.daxpay.single.code.PayChannelEnum; import cn.daxpay.single.service.code.PayCallbackStatusEnum; import cn.daxpay.single.service.code.PaymentTypeEnum; import cn.daxpay.single.service.core.record.callback.convert.PayCallbackRecordConvert; import cn.daxpay.single.service.dto.record.callback.PayCallbackRecordDto; -import cn.bootx.table.modify.annotation.DbColumn; -import cn.bootx.table.modify.annotation.DbTable; -import cn.bootx.table.modify.mysql.annotation.DbMySqlFieldType; -import cn.bootx.table.modify.mysql.constants.MySqlFieldTypeEnum; import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -30,49 +30,51 @@ import lombok.experimental.Accessors; public class PayCallbackRecord extends MpCreateEntity implements EntityBaseFunction { /** 本地交易号 */ - @DbColumn(comment = "本地交易号") + @DbMySqlIndex(comment = "本地交易号索引") + @DbColumn(comment = "本地交易号", length = 32, isNull = false) private String tradeNo; /** 通道交易号 */ - @DbColumn(comment = "通道交易号") + @DbMySqlIndex(comment = "通道交易号索引") + @DbColumn(comment = "通道交易号", length = 150, isNull = false) private String outTradeNo; /** * 支付通道 * @see PayChannelEnum#getCode() */ - @DbColumn(comment = "支付通道") + @DbColumn(comment = "支付通道", length = 20, isNull = false) private String channel; /** * 回调类型 * @see PaymentTypeEnum */ - @DbColumn(comment = "回调类型") + @DbColumn(comment = "回调类型", length = 20, isNull = false) private String callbackType; /** 通知消息内容 */ @DbMySqlFieldType(MySqlFieldTypeEnum.LONGTEXT) - @DbColumn(comment = "通知消息") + @DbColumn(comment = "通知消息", isNull = false) private String notifyInfo; /** * @see PayCallbackStatusEnum */ - @DbColumn(comment = "回调处理状态") + @DbColumn(comment = "回调处理状态", length = 20, isNull = false) private String status; /** 修复号 */ - @Schema(description = "修复号") + @DbColumn(comment = "修复号", length = 32, isNull = false) private String repairOrderNo; /** 错误码 */ - @DbColumn(comment = "错误码") + @DbColumn(comment = "错误码", length = 10) private String errorCode; - /** 提示信息 */ - @DbColumn(comment = "提示信息") + /** 错误信息 */ + @DbColumn(comment = "错误信息", length = 150) private String errorMsg; /** diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/close/entity/PayCloseRecord.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/close/entity/PayCloseRecord.java index f96ac5ec..b37f7193 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/close/entity/PayCloseRecord.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/close/entity/PayCloseRecord.java @@ -2,6 +2,7 @@ package cn.daxpay.single.service.core.record.close.entity; import cn.bootx.platform.common.core.function.EntityBaseFunction; import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity; +import cn.bootx.table.modify.mysql.annotation.DbMySqlIndex; import cn.daxpay.single.code.PayChannelEnum; import cn.daxpay.single.service.code.PayCloseTypeEnum; import cn.daxpay.single.service.core.record.close.convert.PayCloseRecordConvert; @@ -25,44 +26,46 @@ import lombok.experimental.Accessors; @TableName("pay_close_record") public class PayCloseRecord extends MpCreateEntity implements EntityBaseFunction { - /** 订单号 */ - @DbColumn(comment = "订单号") + /** 支付订单号 */ + @DbMySqlIndex(comment = "支付订单号索引") + @DbColumn(comment = "支付订单号", length = 32, isNull = false) private String orderNo; - /** 商户订单号 */ - @DbColumn(comment = "商户订单号") + /** 商户支付订单号 */ + @DbMySqlIndex(comment = "商户支付订单号索引") + @DbColumn(comment = "商户支付订单号", length = 100, isNull = false) private String bizOrderNo; /** - * 关闭的支付通道 + * 支付通道 * @see PayChannelEnum */ - @DbColumn(comment = "关闭的支付通道") + @DbColumn(comment = "支付通道", length = 20, isNull = false) private String channel; /** * 关闭类型 关闭/撤销 * @see PayCloseTypeEnum */ - @DbColumn(comment = "关闭类型") + @DbColumn(comment = "关闭类型", length = 20, isNull = false) private String closeType; /** * 是否关闭成功 */ - @DbColumn(comment = "是否关闭成功") + @DbColumn(comment = "是否关闭成功", isNull = false) private boolean closed; /** 错误码 */ - @DbColumn(comment = "错误码") + @DbColumn(comment = "错误码", length = 10) private String errorCode; - /** 错误消息 */ - @DbColumn(comment = "错误消息") + /** 错误信息 */ + @DbColumn(comment = "错误信息", length = 150) private String errorMsg; - /** 客户端IP */ - @DbColumn(comment = "客户端IP") + /** 终端ip */ + @DbColumn(comment = "支付终端ip", length = 64) private String clientIp; /** diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/sync/entity/PaySyncRecord.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/sync/entity/PaySyncRecord.java index 67acaf26..f7eaccf3 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/sync/entity/PaySyncRecord.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/core/record/sync/entity/PaySyncRecord.java @@ -81,15 +81,15 @@ public class PaySyncRecord extends MpCreateEntity implements EntityBaseFunction< private String repairNo; /** 错误码 */ - @DbColumn(comment = "错误码") + @DbColumn(comment = "错误码", length = 10) private String errorCode; - /** 错误消息 */ - @DbColumn(comment = "错误消息") + /** 错误信息 */ + @DbColumn(comment = "错误信息", length = 150) private String errorMsg; - /** 客户端IP */ - @DbColumn(comment = "客户端IP") + /** 终端ip */ + @DbColumn(comment = "支付终端ip", length = 64) private String clientIp; /** diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/dto/record/close/PayCloseRecordDto.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/dto/record/close/PayCloseRecordDto.java index b165e89a..33fa91c6 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/dto/record/close/PayCloseRecordDto.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/dto/record/close/PayCloseRecordDto.java @@ -49,14 +49,14 @@ public class PayCloseRecordDto extends BaseDto { private boolean closed; /** 错误码 */ - @DbColumn(comment = "错误码") + @DbColumn(comment = "错误码", length = 10) private String errorCode; - /** 错误消息 */ - @DbColumn(comment = "错误消息") + /** 错误信息 */ + @DbColumn(comment = "错误信息", length = 150) private String errorMsg; - /** 客户端IP */ - @DbColumn(comment = "客户端IP") + /** 终端ip */ + @DbColumn(comment = "支付终端ip", length = 64) private String clientIp; } diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/dto/record/notice/ClientNoticeRecordDto.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/dto/record/notice/ClientNoticeRecordDto.java index e635e1b1..cbf960ce 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/dto/record/notice/ClientNoticeRecordDto.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/dto/record/notice/ClientNoticeRecordDto.java @@ -37,8 +37,8 @@ public class ClientNoticeRecordDto extends BaseDto { @Schema(description = "发送是否成功") private boolean success; - /** 错误编码 */ - @Schema(description = "错误编码") + /** 错误码 */ + @Schema(description = "错误码") private String errorCode; /** 错误信息 */ diff --git a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/param/record/PayCloseRecordQuery.java b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/param/record/PayCloseRecordQuery.java index 686a991c..c74d22b0 100644 --- a/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/param/record/PayCloseRecordQuery.java +++ b/daxpay-single/daxpay-single-service/src/main/java/cn/daxpay/single/service/param/record/PayCloseRecordQuery.java @@ -48,7 +48,7 @@ public class PayCloseRecordQuery extends QueryOrder { @DbColumn(comment = "错误消息") private String errorMsg; - /** 客户端IP */ - @DbColumn(comment = "客户端IP") + /** 终端ip */ + @DbColumn(comment = "支付终端ip", length = 64) private String clientIp; }