mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-06 20:47:46 +00:00
ref 添加字段长度必填和索引等信息
This commit is contained in:
@@ -11,10 +11,10 @@
|
||||
- [x] 请求IP参数增加正则校验
|
||||
- [x] 支付接口公共参数添加随机数字段, 预防重放问题
|
||||
- [x] 请求接口增加有效期校验, 超时后失效
|
||||
- [ ] 数据库表进行规则, 字段设置长度, 增加索引, 对应请求参数添加校验
|
||||
- [x] 数据库表进行规则, 字段设置长度, 增加索引, 对应请求参数添加校验
|
||||
- [x] 订单
|
||||
- [ ] 记录
|
||||
- [ ] 配置
|
||||
- [x] 记录
|
||||
- [x] 配置
|
||||
- [x] 订单和扩展信息进行合并
|
||||
- [x] 支付通道两个独立的配置进行合并为一个
|
||||
- [X] 去除有效, icon, 颜色等字段
|
||||
|
@@ -5,6 +5,7 @@ import cn.bootx.platform.common.core.rest.Res;
|
||||
import cn.bootx.platform.common.core.rest.ResResult;
|
||||
import cn.bootx.platform.common.core.rest.dto.LabelValue;
|
||||
import cn.bootx.platform.common.core.rest.param.PageParam;
|
||||
import cn.bootx.platform.common.core.util.ValidationUtil;
|
||||
import cn.daxpay.single.code.PaymentApiCode;
|
||||
import cn.daxpay.single.param.payment.allocation.AllocReceiverAddParam;
|
||||
import cn.daxpay.single.param.payment.allocation.AllocReceiverRemoveParam;
|
||||
@@ -66,6 +67,7 @@ public class AllocationReceiverController {
|
||||
@Operation(summary = "添加")
|
||||
@PostMapping("add")
|
||||
public ResResult<Void> add(@RequestBody AllocReceiverAddParam param){
|
||||
ValidationUtil.validateParam(param);
|
||||
receiverService.addAndSync(param);
|
||||
return Res.ok();
|
||||
}
|
||||
@@ -74,6 +76,7 @@ public class AllocationReceiverController {
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("delete")
|
||||
public ResResult<Void> delete(@RequestBody AllocReceiverRemoveParam param){
|
||||
ValidationUtil.validateParam(param);
|
||||
receiverService.remove(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ package cn.daxpay.single.admin.controller.system;
|
||||
|
||||
import cn.bootx.platform.common.core.rest.Res;
|
||||
import cn.bootx.platform.common.core.rest.ResResult;
|
||||
import cn.bootx.platform.common.core.util.ValidationUtil;
|
||||
import cn.daxpay.single.service.core.system.config.service.PayApiConfigService;
|
||||
import cn.daxpay.single.service.dto.system.config.PayApiConfigDto;
|
||||
import cn.daxpay.single.service.param.system.config.PayApiConfigParam;
|
||||
@@ -37,6 +38,7 @@ public class PayApiConfigController {
|
||||
@Operation(summary = "更新")
|
||||
@PostMapping("/update")
|
||||
public ResResult<Void> update(@RequestBody PayApiConfigParam param){
|
||||
ValidationUtil.validateParam(param);
|
||||
payApiConfigService.update(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ package cn.daxpay.single.admin.controller.system;
|
||||
|
||||
import cn.bootx.platform.common.core.rest.Res;
|
||||
import cn.bootx.platform.common.core.rest.ResResult;
|
||||
import cn.bootx.platform.common.core.util.ValidationUtil;
|
||||
import cn.daxpay.single.service.core.system.payinfo.service.PayMethodInfoService;
|
||||
import cn.daxpay.single.service.dto.system.payinfo.PayMethodInfoDto;
|
||||
import cn.daxpay.single.service.param.system.payinfo.PayWayInfoParam;
|
||||
@@ -39,6 +40,7 @@ public class PayMethodInfoController {
|
||||
@Operation(summary = "更新")
|
||||
@PostMapping("/update")
|
||||
public ResResult<Void> update(@RequestBody PayWayInfoParam param){
|
||||
ValidationUtil.validateParam(param);
|
||||
payMethodInfoService.update(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ package cn.daxpay.single.admin.controller.system;
|
||||
|
||||
import cn.bootx.platform.common.core.rest.Res;
|
||||
import cn.bootx.platform.common.core.rest.ResResult;
|
||||
import cn.bootx.platform.common.core.util.ValidationUtil;
|
||||
import cn.daxpay.single.service.core.system.config.service.PlatformConfigService;
|
||||
import cn.daxpay.single.service.dto.system.config.PlatformConfigDto;
|
||||
import cn.daxpay.single.service.param.system.config.PlatformConfigParam;
|
||||
@@ -31,6 +32,7 @@ public class PlatformConfigController {
|
||||
@Operation(summary = "更新平台配置项")
|
||||
@PostMapping("/update")
|
||||
public ResResult<Void> update(@RequestBody PlatformConfigParam param){
|
||||
ValidationUtil.validateParam(param);
|
||||
platformConfigService.update(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
@@ -9,7 +9,8 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* 分账接收者添加参数
|
||||
@@ -23,7 +24,8 @@ import javax.validation.constraints.NotEmpty;
|
||||
public class AllocReceiverAddParam extends PaymentCommonParam {
|
||||
|
||||
@Schema(description = "接收者编号, 需要保证唯一")
|
||||
@NotEmpty(message = "接收者编号必填")
|
||||
@NotBlank(message = "接收者编号必填")
|
||||
@Size(max = 32, message = "接收者编号不可超过32位")
|
||||
private String receiverNo;
|
||||
|
||||
/**
|
||||
@@ -31,7 +33,8 @@ public class AllocReceiverAddParam extends PaymentCommonParam {
|
||||
* @see PayChannelEnum
|
||||
*/
|
||||
@Schema(description = "所属通道")
|
||||
@NotEmpty(message = "所属通道必填")
|
||||
@NotBlank(message = "所属通道必填")
|
||||
@Size(max = 20, message = "所属通道不可超过20位")
|
||||
private String channel;
|
||||
|
||||
/**
|
||||
@@ -39,16 +42,19 @@ public class AllocReceiverAddParam extends PaymentCommonParam {
|
||||
* @see AllocReceiverTypeEnum
|
||||
*/
|
||||
@Schema(description = "分账接收方类型")
|
||||
@NotEmpty(message = "分账接收方类型必填")
|
||||
@NotBlank(message = "分账接收方类型必填")
|
||||
@Size(max = 20, message = "分账接收方类型不可超过20位")
|
||||
private String receiverType;
|
||||
|
||||
/** 接收方账号 */
|
||||
@Schema(description = "接收方账号")
|
||||
@NotEmpty(message = "接收方账号必填")
|
||||
@NotBlank(message = "接收方账号必填")
|
||||
@Size(max = 100, message = "接收方账号不可超过100位")
|
||||
private String receiverAccount;
|
||||
|
||||
/** 接收方姓名 */
|
||||
@Schema(description = "接收方姓名")
|
||||
@Size(max = 100, message = "接收方姓名不可超过50位")
|
||||
private String receiverName;
|
||||
|
||||
/**
|
||||
@@ -56,10 +62,12 @@ public class AllocReceiverAddParam extends PaymentCommonParam {
|
||||
* @see AllocRelationTypeEnum
|
||||
*/
|
||||
@Schema(description = "分账关系类型")
|
||||
@NotEmpty(message = "分账关系类型必填")
|
||||
@NotBlank(message = "分账关系类型必填")
|
||||
@Size(max = 20, message = "分账关系类型不可超过20位")
|
||||
private String relationType;
|
||||
|
||||
/** 关系名称 关系类型为自定义是填写 */
|
||||
@Schema(description = "关系名称")
|
||||
@Size(max = 50, message = "关系名称不可超过50位")
|
||||
private String relationName;
|
||||
}
|
||||
|
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@@ -20,7 +21,7 @@ public class AllocReceiverParam {
|
||||
|
||||
/** 分账接收方编号 */
|
||||
@Schema(description = "分账接收方编号")
|
||||
@NotEmpty(message = "分账接收方编号必填")
|
||||
@NotBlank(message = "分账接收方编号必填")
|
||||
private String receiverNo;
|
||||
|
||||
/** 分账金额 */
|
||||
|
@@ -6,7 +6,9 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* 分账接收者删除参数
|
||||
@@ -20,7 +22,8 @@ import javax.validation.constraints.NotEmpty;
|
||||
public class AllocReceiverRemoveParam extends PaymentCommonParam {
|
||||
|
||||
@Schema(description = "接收者编号")
|
||||
@NotEmpty(message = "接收者编号必填")
|
||||
@NotBlank(message = "接收者编号必填")
|
||||
@Size(max = 32, message = "接收者编号不可超过32位")
|
||||
private String receiverNo;
|
||||
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ public class AliPayConfig extends MpBaseEntity implements EntityBaseFunction<Ali
|
||||
private Boolean allocation;
|
||||
|
||||
/** 支付限额 */
|
||||
@DbColumn(comment = "支付限额")
|
||||
@DbColumn(comment = "支付限额", length = 15)
|
||||
private Integer singleLimit;
|
||||
|
||||
/**
|
||||
@@ -56,7 +56,7 @@ public class AliPayConfig extends MpBaseEntity implements EntityBaseFunction<Ali
|
||||
* 2. 不能加?id=123这类自定义参数,必须外网可以正常访问
|
||||
* 3. 调用顺序 支付宝网关 -> 本网关进行处理 -> 发送消息通知业务系统
|
||||
*/
|
||||
@DbColumn(comment = "异步通知页面路径")
|
||||
@DbColumn(comment = "异步通知接收路径", length = 200)
|
||||
private String notifyUrl;
|
||||
|
||||
/**
|
||||
@@ -65,22 +65,22 @@ public class AliPayConfig extends MpBaseEntity implements EntityBaseFunction<Ali
|
||||
* 2. 不能加?id=123这类自定义参数,必须外网可以正常访问
|
||||
* 3. 消息顺序 支付宝网关 -> 本网关进行处理 -> 重定向到业务系统中
|
||||
*/
|
||||
@DbColumn(comment = "同步通知页面路径")
|
||||
@DbColumn(comment = "同步通知页面路径", length = 200)
|
||||
private String returnUrl;
|
||||
|
||||
/** 支付网关地址 */
|
||||
@DbColumn(comment = "支付网关地址")
|
||||
@DbColumn(comment = "支付网关地址", length = 200)
|
||||
private String serverUrl;
|
||||
|
||||
/**
|
||||
* 认证类型 证书/公钥
|
||||
* @see AliPayCode#AUTH_TYPE_KEY
|
||||
*/
|
||||
@DbColumn(comment = "认证类型")
|
||||
@DbColumn(comment = "认证类型", length = 20)
|
||||
private String authType;
|
||||
|
||||
/** 签名类型 RSA2 */
|
||||
@DbColumn(comment = "签名类型 RSA2")
|
||||
@DbColumn(comment = "签名类型 RSA2", length = 20)
|
||||
public String signType;
|
||||
|
||||
/**
|
||||
|
@@ -59,12 +59,12 @@ public class AllocOrderDetail extends MpBaseEntity implements EntityBaseFunction
|
||||
private String receiverType;
|
||||
|
||||
/** 接收方账号 */
|
||||
@DbColumn(comment = "接收方账号", length = 150, isNull = false)
|
||||
@DbColumn(comment = "接收方账号", length = 100, isNull = false)
|
||||
@TableField(typeHandler = DecryptTypeHandler.class)
|
||||
private String receiverAccount;
|
||||
|
||||
/** 接收方姓名 */
|
||||
@DbColumn(comment = "接收方姓名", length = 150)
|
||||
@DbColumn(comment = "接收方姓名", length = 100)
|
||||
private String receiverName;
|
||||
|
||||
/**
|
||||
|
@@ -36,65 +36,65 @@ import java.util.List;
|
||||
public class ReconcileDiff extends MpBaseEntity implements EntityBaseFunction<ReconcileDiffDto> {
|
||||
|
||||
/** 对账单ID */
|
||||
@DbColumn(comment = "对账单ID")
|
||||
@DbColumn(comment = "对账单ID", isNull = false)
|
||||
private Long reconcileId;
|
||||
|
||||
/** 对账号 */
|
||||
@DbColumn(comment = "对账号")
|
||||
@DbColumn(comment = "对账号", length = 32, isNull = false)
|
||||
private String reconcileNo;
|
||||
|
||||
/** 对账单明细ID */
|
||||
@DbColumn(comment = "对账单明细ID")
|
||||
@DbColumn(comment = "对账单明细ID", isNull = false)
|
||||
private Long detailId;
|
||||
|
||||
/** 对账日期 */
|
||||
@DbColumn(comment = "对账日期")
|
||||
@DbColumn(comment = "对账日期", isNull = false)
|
||||
private LocalDate reconcileDate;
|
||||
|
||||
/** 本地交易号 */
|
||||
@DbColumn(comment = "本地交易号")
|
||||
@DbColumn(comment = "本地交易号", length = 32, isNull = false)
|
||||
private String tradeNo;
|
||||
|
||||
/** 通道交易号 */
|
||||
@DbColumn(comment = "通道交易号")
|
||||
@DbColumn(comment = "通道交易号", length = 150, isNull = false)
|
||||
private String outTradeNo;
|
||||
|
||||
/** 交易时间 */
|
||||
@DbColumn(comment = "交易时间")
|
||||
@DbColumn(comment = "交易时间", isNull = false)
|
||||
private LocalDateTime tradeTime;
|
||||
|
||||
/** 订单标题 */
|
||||
@DbColumn(comment = "订单标题")
|
||||
@DbColumn(comment = "订单标题", length = 100)
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 通道
|
||||
* @see PayChannelEnum
|
||||
*/
|
||||
@DbColumn(comment = "通道")
|
||||
@DbColumn(comment = "通道", length = 20, isNull = false)
|
||||
private String channel;
|
||||
|
||||
/** 本地交易金额 */
|
||||
@DbColumn(comment = "本地交易金额")
|
||||
@DbColumn(comment = "本地交易金额", length = 15)
|
||||
private Integer amount;
|
||||
|
||||
|
||||
/** 通道交易金额 */
|
||||
@DbColumn(comment = "通道交易金额")
|
||||
@DbColumn(comment = "通道交易金额", length = 15)
|
||||
private Integer outAmount;
|
||||
|
||||
/**
|
||||
* 交易类型
|
||||
* @see ReconcileTradeEnum
|
||||
*/
|
||||
@DbColumn(comment = "交易类型")
|
||||
@DbColumn(comment = "交易类型", length = 20)
|
||||
private String tradeType;
|
||||
|
||||
/**
|
||||
* 差异类型
|
||||
* @see ReconcileDiffTypeEnum
|
||||
*/
|
||||
@DbColumn(comment = "差异类型")
|
||||
@DbColumn(comment = "差异类型", length = 20)
|
||||
private String diffType;
|
||||
|
||||
/**
|
||||
|
@@ -20,12 +20,12 @@ import lombok.experimental.Accessors;
|
||||
@TableName("pay_allocation_group_receiver")
|
||||
public class AllocationGroupReceiver extends MpCreateEntity {
|
||||
|
||||
@DbColumn(comment = "分账组ID")
|
||||
@DbColumn(comment = "分账组ID", isNull = false)
|
||||
private Long groupId;
|
||||
|
||||
@DbColumn(comment = "接收者ID")
|
||||
@DbColumn(comment = "接收者ID", isNull = false)
|
||||
private Long receiverId;
|
||||
|
||||
@DbColumn(comment = "分账比例(万分之多少)")
|
||||
@DbColumn(comment = "分账比例(万分之多少)", length = 5)
|
||||
private Integer rate;
|
||||
}
|
||||
|
@@ -30,14 +30,14 @@ import lombok.experimental.Accessors;
|
||||
public class AllocationReceiver extends MpBaseEntity implements EntityBaseFunction<AllocationReceiverDto> {
|
||||
|
||||
/** 分账接收方编号, 需要保证唯一 */
|
||||
@DbColumn(comment = "分账接收方编号")
|
||||
@DbColumn(comment = "分账接收方编号", length = 32, isNull = false)
|
||||
private String receiverNo;
|
||||
|
||||
/**
|
||||
* 所属通道
|
||||
* @see PayChannelEnum
|
||||
*/
|
||||
@DbColumn(comment = "所属通道")
|
||||
@DbColumn(comment = "所属通道", length = 20, isNull = false)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private String channel;
|
||||
|
||||
@@ -45,16 +45,16 @@ public class AllocationReceiver extends MpBaseEntity implements EntityBaseFuncti
|
||||
* 分账接收方类型
|
||||
* @see AllocReceiverTypeEnum
|
||||
*/
|
||||
@DbColumn(comment = "分账接收方类型")
|
||||
@DbColumn(comment = "分账接收方类型", length = 20, isNull = false)
|
||||
private String receiverType;
|
||||
|
||||
/** 接收方账号 */
|
||||
@DbColumn(comment = "接收方账号")
|
||||
@DbColumn(comment = "接收方账号", length = 100, isNull = false)
|
||||
@TableField(typeHandler = DecryptTypeHandler.class)
|
||||
private String receiverAccount;
|
||||
|
||||
/** 接收方姓名 */
|
||||
@DbColumn(comment = "接收方姓名")
|
||||
@DbColumn(comment = "接收方姓名", length = 100)
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String receiverName;
|
||||
|
||||
@@ -62,11 +62,11 @@ public class AllocationReceiver extends MpBaseEntity implements EntityBaseFuncti
|
||||
* 分账关系类型
|
||||
* @see AllocRelationTypeEnum
|
||||
*/
|
||||
@DbColumn(comment = "分账关系类型")
|
||||
@DbColumn(comment = "分账关系类型", length = 20, isNull = false)
|
||||
private String relationType;
|
||||
|
||||
/** 关系名称 */
|
||||
@DbColumn(comment = "关系名称")
|
||||
@DbColumn(comment = "关系名称", length = 50)
|
||||
private String relationName;
|
||||
|
||||
/**
|
||||
|
@@ -167,8 +167,7 @@ public class PayAssistService {
|
||||
*/
|
||||
public void validationLimitAmount(PayParam payParam) {
|
||||
// 总额校验
|
||||
PlatformLocal platformInfo = PaymentContextLocal.get()
|
||||
.getPlatformInfo();
|
||||
PlatformLocal platformInfo = PaymentContextLocal.get().getPlatformInfo();
|
||||
if (payParam.getAmount() > platformInfo.getLimitAmount()) {
|
||||
throw new PayFailureException("支付金额超过限额");
|
||||
}
|
||||
|
@@ -64,7 +64,6 @@ public class PayCallbackRecord extends MpCreateEntity implements EntityBaseFunct
|
||||
@DbColumn(comment = "回调处理状态", length = 20, isNull = false)
|
||||
private String status;
|
||||
|
||||
|
||||
/** 修复号 */
|
||||
@DbColumn(comment = "修复号", length = 32, isNull = false)
|
||||
private String repairOrderNo;
|
||||
|
@@ -4,6 +4,7 @@ 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.DbMySqlIndex;
|
||||
import cn.daxpay.single.code.PayChannelEnum;
|
||||
import cn.daxpay.single.service.code.TradeFlowRecordTypeEnum;
|
||||
import cn.daxpay.single.service.core.record.flow.convert.TradeFlowRecordConvert;
|
||||
@@ -26,37 +27,40 @@ import lombok.experimental.Accessors;
|
||||
public class TradeFlowRecord extends MpCreateEntity implements EntityBaseFunction<TradeFlowRecordDto> {
|
||||
|
||||
/** 订单标题 */
|
||||
@DbColumn(comment = "标题")
|
||||
@DbColumn(comment = "标题", length = 100, isNull = false)
|
||||
private String title;
|
||||
|
||||
/** 金额 */
|
||||
@DbColumn(comment = "金额")
|
||||
@DbColumn(comment = "金额", length = 15, isNull = false)
|
||||
private Integer amount;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
* @see TradeFlowRecordTypeEnum
|
||||
*/
|
||||
@DbColumn(comment = "业务类型")
|
||||
@DbColumn(comment = "业务类型", length = 20, isNull = false)
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 支付通道
|
||||
* @see PayChannelEnum
|
||||
*/
|
||||
@DbColumn(comment = "支付通道")
|
||||
@DbColumn(comment = "支付通道", length = 20, isNull = false)
|
||||
private String channel;
|
||||
|
||||
/** 本地交易号 */
|
||||
@DbColumn(comment = "本地交易号")
|
||||
@DbMySqlIndex(comment = "本地交易号索引")
|
||||
@DbColumn(comment = "本地交易号", length = 32, isNull = false)
|
||||
private String tradeNo;
|
||||
|
||||
/** 商户交易号 */
|
||||
@DbColumn(comment = "商户交易号")
|
||||
@DbMySqlIndex(comment = "商户交易号索引")
|
||||
@DbColumn(comment = "商户交易号", length = 100, isNull = false)
|
||||
private String bizTradeNo;
|
||||
|
||||
/** 通道交易号 */
|
||||
@DbColumn(comment = "通道交易号")
|
||||
@DbMySqlIndex(comment = "通道交易号索引")
|
||||
@DbColumn(comment = "通道交易号", length = 150, isNull = false)
|
||||
private String outTradeNo;
|
||||
|
||||
@Override
|
||||
|
@@ -2,15 +2,16 @@ package cn.daxpay.single.service.core.record.repair.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.DbMySqlIndex;
|
||||
import cn.daxpay.single.code.PayStatusEnum;
|
||||
import cn.daxpay.single.service.code.PaymentTypeEnum;
|
||||
import cn.daxpay.single.service.code.PayRepairSourceEnum;
|
||||
import cn.daxpay.single.service.code.PayRepairWayEnum;
|
||||
import cn.daxpay.single.service.code.PaymentTypeEnum;
|
||||
import cn.daxpay.single.service.code.RefundRepairWayEnum;
|
||||
import cn.daxpay.single.service.core.record.repair.convert.PayRepairRecordConvert;
|
||||
import cn.daxpay.single.service.dto.record.repair.PayRepairRecordDto;
|
||||
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;
|
||||
@@ -32,31 +33,32 @@ public class PayRepairRecord extends MpCreateEntity implements EntityBaseFunctio
|
||||
* 修复号
|
||||
* 如果一次修复产生的修复记录有多个记录, 使用这个作为关联
|
||||
*/
|
||||
@DbColumn(comment = "修复号")
|
||||
@DbColumn(comment = "修复号", length = 32, isNull = false)
|
||||
private String repairNo;
|
||||
|
||||
/** 支付ID/退款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 PaymentTypeEnum
|
||||
*/
|
||||
@DbColumn(comment = "修复类型")
|
||||
@DbColumn(comment = "修复类型", length = 20, isNull = false)
|
||||
private String repairType;
|
||||
|
||||
/**
|
||||
* 修复来源
|
||||
* @see PayRepairSourceEnum
|
||||
*/
|
||||
@DbColumn(comment = "修复来源")
|
||||
@DbColumn(comment = "修复来源", length = 20, isNull = false)
|
||||
private String repairSource;
|
||||
|
||||
/**
|
||||
@@ -64,25 +66,25 @@ public class PayRepairRecord extends MpCreateEntity implements EntityBaseFunctio
|
||||
* @see PayRepairWayEnum
|
||||
* @see RefundRepairWayEnum
|
||||
*/
|
||||
@DbColumn(comment = "修复方式")
|
||||
@DbColumn(comment = "修复方式", length = 20, isNull = false)
|
||||
private String repairWay;
|
||||
|
||||
/** 修复的通道 */
|
||||
@DbColumn(comment = "修复的通道")
|
||||
@DbColumn(comment = "修复的通道", length = 20, isNull = false)
|
||||
private String channel;
|
||||
|
||||
/**
|
||||
* 修复前状态
|
||||
* @see PayStatusEnum
|
||||
*/
|
||||
@DbColumn(comment = "修复前状态")
|
||||
@DbColumn(comment = "修复前状态", length = 20, isNull = false)
|
||||
private String beforeStatus;
|
||||
|
||||
/**
|
||||
* 修复后状态
|
||||
* @see PayStatusEnum
|
||||
*/
|
||||
@DbColumn(comment = "修复后状态")
|
||||
@DbColumn(comment = "修复后状态", length = 20, isNull = false)
|
||||
private String afterStatus;
|
||||
|
||||
/**
|
||||
|
@@ -2,17 +2,17 @@ package cn.daxpay.single.service.core.record.sync.entity;
|
||||
|
||||
import cn.bootx.platform.common.core.function.EntityBaseFunction;
|
||||
import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity;
|
||||
import cn.daxpay.single.code.AllocOrderStatusEnum;
|
||||
import cn.daxpay.single.code.PayChannelEnum;
|
||||
import cn.daxpay.single.code.RefundSyncStatusEnum;
|
||||
import cn.daxpay.single.code.PaySyncStatusEnum;
|
||||
import cn.daxpay.single.service.code.PaymentTypeEnum;
|
||||
import cn.daxpay.single.service.core.record.sync.convert.PaySyncRecordConvert;
|
||||
import cn.daxpay.single.service.dto.record.sync.PaySyncRecordDto;
|
||||
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.code.PaySyncStatusEnum;
|
||||
import cn.daxpay.single.code.RefundSyncStatusEnum;
|
||||
import cn.daxpay.single.service.code.PaymentTypeEnum;
|
||||
import cn.daxpay.single.service.core.record.sync.convert.PaySyncRecordConvert;
|
||||
import cn.daxpay.single.service.dto.record.sync.PaySyncRecordDto;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -31,53 +31,55 @@ import lombok.experimental.Accessors;
|
||||
public class PaySyncRecord extends MpCreateEntity implements EntityBaseFunction<PaySyncRecordDto> {
|
||||
|
||||
/** 本地交易号 */
|
||||
@DbColumn(comment = "本地交易号")
|
||||
@DbMySqlIndex(comment = "本地交易号索引")
|
||||
@DbColumn(comment = "本地交易号", length = 32, isNull = false)
|
||||
private String tradeNo;
|
||||
|
||||
/** 商户交易号 */
|
||||
@DbColumn(comment = "商户交易号")
|
||||
@DbMySqlIndex(comment = "商户交易号索引")
|
||||
@DbColumn(comment = "商户交易号", length = 100, isNull = false)
|
||||
private String bizTradeNo;
|
||||
|
||||
/** 通道交易号 */
|
||||
@DbColumn(comment = "通道交易号")
|
||||
@DbMySqlIndex(comment = "通道交易号索引")
|
||||
@DbColumn(comment = "通道交易号", length = 150, isNull = false)
|
||||
private String outTradeNo;
|
||||
|
||||
|
||||
/**
|
||||
* 三方支付返回状态
|
||||
* @see PaySyncStatusEnum
|
||||
* @see RefundSyncStatusEnum
|
||||
*/
|
||||
@DbColumn(comment = "网关返回状态")
|
||||
@DbColumn(comment = "网关返回状态", length = 20, isNull = false)
|
||||
private String outTradeStatus;
|
||||
|
||||
/**
|
||||
* 同步类型 支付/退款
|
||||
* @see PaymentTypeEnum
|
||||
*/
|
||||
@DbColumn(comment = "同步类型")
|
||||
@DbColumn(comment = "同步类型", length = 20, isNull = false)
|
||||
private String syncType;
|
||||
|
||||
/**
|
||||
* 同步的异步通道
|
||||
* @see PayChannelEnum#getCode()
|
||||
*/
|
||||
@DbColumn(comment = "同步的异步通道")
|
||||
@DbColumn(comment = "同步的异步通道", length = 20, isNull = false)
|
||||
private String channel;
|
||||
|
||||
/** 网关返回的同步消息 */
|
||||
@DbMySqlFieldType(MySqlFieldTypeEnum.LONGTEXT)
|
||||
@DbColumn(comment = "同步消息")
|
||||
@DbColumn(comment = "同步消息", isNull = false)
|
||||
private String syncInfo;
|
||||
|
||||
/**
|
||||
* 支付单如果状态不一致, 是否进行修复
|
||||
*/
|
||||
@DbColumn(comment = "是否进行修复")
|
||||
@DbColumn(comment = "是否进行修复", isNull = false)
|
||||
private boolean repair;
|
||||
|
||||
/** 修复单号 */
|
||||
@DbColumn(comment = "修复单号")
|
||||
@DbColumn(comment = "修复单号", length = 32)
|
||||
private String repairNo;
|
||||
|
||||
/** 错误码 */
|
||||
|
@@ -25,22 +25,22 @@ import lombok.experimental.Accessors;
|
||||
@TableName("pay_api_config")
|
||||
public class PayApiConfig extends MpBaseEntity implements EntityBaseFunction<PayApiConfigDto> {
|
||||
|
||||
@DbColumn(comment = "编码")
|
||||
@DbColumn(comment = "编码",length = 50, isNull = false)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private String code;
|
||||
|
||||
@DbColumn(comment = "接口地址")
|
||||
@DbColumn(comment = "接口地址", length = 200, isNull = false)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private String api;
|
||||
|
||||
@DbColumn(comment = "名称")
|
||||
@DbColumn(comment = "名称", length = 100, isNull = false)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private String name;
|
||||
|
||||
@DbColumn(comment = "是否启用")
|
||||
@DbColumn(comment = "是否启用", isNull = false)
|
||||
private boolean enable;
|
||||
|
||||
@DbColumn(comment = "备注")
|
||||
@DbColumn(comment = "备注", length = 200)
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
|
@@ -27,17 +27,17 @@ import lombok.experimental.Accessors;
|
||||
public class PayChannelConfig extends MpBaseEntity implements EntityBaseFunction<PayChannelConfigDto> {
|
||||
|
||||
/** 需要与系统中配置的枚举一致 */
|
||||
@DbColumn(comment = "代码")
|
||||
@DbColumn(comment = "代码", length = 20, isNull = false)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private String code;
|
||||
|
||||
/** 需要与系统中配置的枚举一致 */
|
||||
@DbColumn(comment = "名称")
|
||||
@DbColumn(comment = "名称", length = 20, isNull = false)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private String name;
|
||||
|
||||
/** 备注 */
|
||||
@DbColumn(comment = "备注")
|
||||
@DbColumn(comment = "备注", length = 200)
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
|
@@ -8,6 +8,8 @@ import cn.daxpay.single.service.core.system.config.convert.PlatformConfigConvert
|
||||
import cn.daxpay.single.service.dto.system.config.PlatformConfigDto;
|
||||
import cn.bootx.table.modify.annotation.DbColumn;
|
||||
import cn.bootx.table.modify.annotation.DbTable;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -25,21 +27,23 @@ import lombok.experimental.Accessors;
|
||||
@TableName("pay_platform_config")
|
||||
public class PlatformConfig extends MpBaseEntity implements EntityBaseFunction<PlatformConfigDto> {
|
||||
|
||||
@DbColumn(comment = "网站地址")
|
||||
@DbColumn(comment = "网站地址", length = 200, isNull = false)
|
||||
private String websiteUrl;
|
||||
|
||||
/**
|
||||
* @see PaySignTypeEnum
|
||||
*/
|
||||
@DbColumn(comment = "签名方式")
|
||||
@DbColumn(comment = "签名方式", length = 20)
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String signType;
|
||||
|
||||
/** 签名秘钥 */
|
||||
@DbColumn(comment = "签名秘钥")
|
||||
@DbColumn(comment = "签名秘钥", length = 50)
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String signSecret;
|
||||
|
||||
/** 是否对请求进行验签 */
|
||||
@DbColumn(comment = "是否对请求进行验签")
|
||||
@DbColumn(comment = "是否对请求进行验签", isNull = false)
|
||||
private boolean reqSign;
|
||||
|
||||
/**
|
||||
@@ -47,30 +51,35 @@ public class PlatformConfig extends MpBaseEntity implements EntityBaseFunction<P
|
||||
* 如果传输的请求时间早于当前服务时间, 而且差值超过配置的时长, 将会请求失败
|
||||
* 如果传输的请求时间比服务时间大于配置的时长(超过一分钟), 将会请求失败
|
||||
*/
|
||||
@DbColumn(comment = "请求有效时长(秒)")
|
||||
@DbColumn(comment = "请求有效时长(秒)", length = 10, isNull = false)
|
||||
private Integer reqTimeout;
|
||||
|
||||
/**
|
||||
* 消息通知方式, 目前只支持http
|
||||
* @see TradeNotifyTypeEnum
|
||||
*/
|
||||
@DbColumn(comment = "消息通知方式")
|
||||
@DbColumn(comment = "消息通知方式", length = 20)
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String notifyType;
|
||||
|
||||
/** 消息通知地址 */
|
||||
@DbColumn(comment = "消息通知地址")
|
||||
@DbColumn(comment = "消息通知地址", length = 200)
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String notifyUrl;
|
||||
|
||||
/** 同步支付跳转地址 */
|
||||
@DbColumn(comment = "同步支付跳转地址")
|
||||
@DbColumn(comment = "同步支付跳转地址", length = 200)
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String returnUrl;
|
||||
|
||||
/** 支付限额 */
|
||||
@DbColumn(comment = "支付限额")
|
||||
@DbColumn(comment = "支付限额", length = 15)
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Integer limitAmount;
|
||||
|
||||
/** 订单默认超时时间(分钟) */
|
||||
@DbColumn(comment = "订单默认超时时间(分钟)")
|
||||
@DbColumn(comment = "订单默认超时时间(分钟)", length = 8)
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Integer orderTimeout;
|
||||
|
||||
/**
|
||||
|
@@ -27,17 +27,17 @@ import lombok.experimental.Accessors;
|
||||
public class PayMethodInfo extends MpBaseEntity implements EntityBaseFunction<PayMethodInfoDto> {
|
||||
|
||||
/** 需要与系统中配置的枚举一致 */
|
||||
@DbColumn(comment = "代码")
|
||||
@DbColumn(comment = "代码", length = 20, isNull = false)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private String code;
|
||||
|
||||
/** 需要与系统中配置的枚举一致 */
|
||||
@DbColumn(comment = "名称")
|
||||
@DbColumn(comment = "名称", length = 100, isNull = false)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private String name;
|
||||
|
||||
/** 备注 */
|
||||
@DbColumn(comment = "备注")
|
||||
@DbColumn(comment = "备注", length = 200)
|
||||
private String remark;
|
||||
|
||||
public static PayMethodInfoDto convert(PayMethodInfo in) {
|
||||
|
@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
@@ -22,7 +23,7 @@ public class AllocationGroupUnbindParam {
|
||||
@Schema(description = "分账组ID")
|
||||
private Long groupId;
|
||||
|
||||
@NotEmpty(message = "分账接收方不可为空")
|
||||
@NotBlank(message = "分账接收方不可为空")
|
||||
@Schema(description = "分账接收方集合")
|
||||
List<Long> receiverIds;
|
||||
}
|
||||
|
@@ -4,6 +4,9 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* 支付开放接口管理
|
||||
* @author xxm
|
||||
@@ -14,12 +17,15 @@ import lombok.experimental.Accessors;
|
||||
@Schema(title = "支付开放接口管理")
|
||||
public class PayApiConfigParam {
|
||||
|
||||
@Schema(description = "id")
|
||||
|
||||
@NotNull(message = "主键不能为空")
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private boolean enable;
|
||||
|
||||
@Size(max = 200, message = "备注长度不能超过200")
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
}
|
||||
|
@@ -6,6 +6,10 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* 平台配置
|
||||
* @author xxm
|
||||
@@ -16,6 +20,8 @@ import lombok.experimental.Accessors;
|
||||
@Schema(title = "平台配置")
|
||||
public class PlatformConfigParam {
|
||||
|
||||
@NotBlank(message = "网站地址必填")
|
||||
@Size(min = 1, max = 200, message = "网站地址不可超过200位")
|
||||
@Schema(description = "网站地址")
|
||||
private String websiteUrl;
|
||||
|
||||
@@ -28,15 +34,20 @@ public class PlatformConfigParam {
|
||||
* 如果传输的请求时间早于当前服务时间, 而且差值超过配置的时长, 将会请求失败
|
||||
* 如果传输的请求时间比服务时间大于配置的时长(超过一分钟), 将会请求失败
|
||||
*/
|
||||
@Min(value = 1, message = "请求有效时长不可小于1秒")
|
||||
@Schema(description = "请求有效时长(秒)")
|
||||
private Integer reqTimeout;
|
||||
|
||||
/**
|
||||
* 签名方式
|
||||
* @see PaySignTypeEnum
|
||||
*/
|
||||
@Size(max = 20, message = "签名方式不可超过20位")
|
||||
@Schema(description = "签名方式")
|
||||
private String signType;
|
||||
|
||||
/** 签名秘钥 */
|
||||
@Size(max = 50, message = "签名秘钥不可超过50位")
|
||||
@Schema(description = "签名秘钥")
|
||||
private String signSecret;
|
||||
|
||||
@@ -44,20 +55,27 @@ public class PlatformConfigParam {
|
||||
* 消息通知方式, 目前只支持http
|
||||
* @see TradeNotifyTypeEnum
|
||||
*/
|
||||
@Size(max = 20, message = "消息通知方式不可超过20位")
|
||||
@Schema(description = "消息通知方式")
|
||||
private String notifyType;
|
||||
|
||||
/** 消息通知地址 */
|
||||
|
||||
@Size(max = 200, message = "消息通知地址不可超过200位")
|
||||
@Schema(description = "消息通知地址")
|
||||
private String notifyUrl;
|
||||
|
||||
/** 同步支付跳转地址 */
|
||||
@Size(max = 200, message = "同步支付跳转地址不可超过200位")
|
||||
@Schema(description = "同步支付跳转地址")
|
||||
private String returnUrl;
|
||||
|
||||
/** 订单默认超时时间(分钟) */
|
||||
@Min(value = 5, message = "订单默认超时时间不可小于5分钟")
|
||||
@Schema(description = "订单默认超时时间(分钟)")
|
||||
private Integer orderTimeout;
|
||||
|
||||
/** 订单支付限额(分) */
|
||||
@Min(value = 1, message = "订单支付限额不可小于0.01元")
|
||||
@Schema(description = "订单支付限额(分)")
|
||||
private Integer limitAmount;
|
||||
}
|
||||
|
@@ -5,26 +5,18 @@ import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
*
|
||||
* 支付通道配置
|
||||
* @author xxm
|
||||
* @since 2024/1/8
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "")
|
||||
@Schema(title = "支付通道配置")
|
||||
public class PayChannelInfoParam {
|
||||
|
||||
@Schema(description= "主键")
|
||||
private Long id;
|
||||
|
||||
/** logo图片 */
|
||||
@Schema(description = "logo图片")
|
||||
private Long iconId;
|
||||
|
||||
/** 卡牌背景色 */
|
||||
@Schema(description = "卡牌背景色")
|
||||
private String bgColor;
|
||||
|
||||
/** 备注 */
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
@@ -4,6 +4,9 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author xxm
|
||||
@@ -14,9 +17,11 @@ import lombok.experimental.Accessors;
|
||||
@Schema(title = "支付方式信息")
|
||||
public class PayWayInfoParam {
|
||||
|
||||
@NotNull(message = "主键不能为空")
|
||||
@Schema(description= "主键")
|
||||
private Long id;
|
||||
|
||||
@Size(max = 200, message = "备注长度不能超过200")
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
}
|
||||
|
Reference in New Issue
Block a user