feat:第三方密钥管理
This commit is contained in:
1 parent
3c20ebf10a
commit
970bae2ddb
19 files changed
+554
-49
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
package com.bsd.pjcloud.thirdparty.constant;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bsd.pjcloud.thirdparty.constant.pay.ThirdPayApiBizTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 第三方key类型
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ThirdKeyTypeEnum {
|
||||
|
||||
LB("10", "宁波银行"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
public static ThirdKeyTypeEnum valueOfByType(String type) {
|
||||
if (ObjectUtil.isEmpty(type)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
|
||||
}
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.bsd.pjcloud.thirdparty.constant.pay;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 第三方统一支付api类型
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ThirdPayApiBizTypeEnum {
|
||||
|
||||
PAY("10", "支付"),
|
||||
REFUND("20", "退款"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
public static ThirdPayApiBizTypeEnum valueOfByType(String type) {
|
||||
if (ObjectUtil.isEmpty(type)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
|
||||
}
|
||||
|
||||
}
|
||||
+4
-5
@@ -2,25 +2,24 @@ package com.bsd.pjcloud.thirdparty.constant.pay;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 第三方统一支付类型
|
||||
* 第三方统一支付来源类型
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum ThirdPayBizTypeEnum {
|
||||
public enum ThirdPaySoureBizTypeEnum {
|
||||
|
||||
LB_PAY("10", "宁波银行支付"),
|
||||
LB("10", "宁波银行"),
|
||||
;
|
||||
|
||||
private final String type;
|
||||
private final String description;
|
||||
|
||||
public static ThirdPayBizTypeEnum valueOfByType(String type) {
|
||||
public static ThirdPaySoureBizTypeEnum valueOfByType(String type) {
|
||||
if (ObjectUtil.isEmpty(type)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.bsd.pjcloud.thirdparty.dto.pay;
|
||||
|
||||
import com.bsd.pjcloud.thirdparty.constant.pay.ThirdPayBizTypeEnum;
|
||||
import com.bsd.pjcloud.thirdparty.constant.pay.ThirdPaySoureBizTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@@ -19,7 +19,7 @@ public class PayDto {
|
||||
/**
|
||||
* 第三方统一支付类型
|
||||
*/
|
||||
private ThirdPayBizTypeEnum bizType;
|
||||
private ThirdPaySoureBizTypeEnum bizType;
|
||||
|
||||
/**
|
||||
* 扣款金额(分)
|
||||
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
package com.bsd.pjcloud.thirdparty.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 第三方密钥管理
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2025-04-30 15:18:13
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("third_key_manage")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "第三方密钥管理")
|
||||
public class ThirdKeyManageEntity extends Model<ThirdKeyManageEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 第三方名字
|
||||
*/
|
||||
@Schema(description="第三方名字")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 第三方类型id(常量)
|
||||
*/
|
||||
@Schema(description="第三方类型id(常量)")
|
||||
private String bizType;
|
||||
|
||||
/**
|
||||
* appKey
|
||||
*/
|
||||
@Schema(description="appKey")
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
* appSecret
|
||||
*/
|
||||
@Schema(description="appSecret")
|
||||
private String appSecret;
|
||||
|
||||
/**
|
||||
* 字段加密key
|
||||
*/
|
||||
@Schema(description="字段加密key")
|
||||
private String fieldKey;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Schema(description="状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description="备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="删除时间")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* tenantId
|
||||
*/
|
||||
@Schema(description="tenantId")
|
||||
private Long tenantId;
|
||||
}
|
||||
+4
-2
@@ -3,14 +3,16 @@ package com.bsd.pjcloud.thirdparty.entity.api;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.*;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 第三方支付日志
|
||||
*/
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("third_pay_log")
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.bsd.pjcloud.thirdparty.vo.pay;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PayGetWalletInfoVo {
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user