feat(config): 初始化项目配置文件
- 添加 application.yml 主配置文件,配置 Spring、Druid、MyBatis-Plus 等基础设置 - 添加 application-dev.yml 开发环境配置,配置数据源及 PingPong 沙箱参数 - 添加数据库建表及配置说明文档(README.md、README_DATABASE.md、README_PRODUCT.md) - 添加商品表结构定义及示例数据说明 - 添加支付相关枚举类 RecordType 和充值信息 DTO RechargeDTO - 添加日志文件 mt-pay.2025-12-19.log 用于记录系统启动异常信息
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package com.mtkj.mtpay.common.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 记录类型枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum RecordType {
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
*/
|
||||
CHECKOUT("CHECKOUT", "创建订单"),
|
||||
|
||||
/**
|
||||
* 回调
|
||||
*/
|
||||
CALLBACK("CALLBACK", "回调"),
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
QUERY("QUERY", "查询"),
|
||||
|
||||
/**
|
||||
* 退款
|
||||
*/
|
||||
REFUND("REFUND", "退款"),
|
||||
|
||||
/**
|
||||
* 预授权完成
|
||||
*/
|
||||
CAPTURE("CAPTURE", "预授权完成"),
|
||||
|
||||
/**
|
||||
* 预授权撤销
|
||||
*/
|
||||
VOID("VOID", "预授权撤销");
|
||||
|
||||
/**
|
||||
* 类型码
|
||||
*/
|
||||
private final String code;
|
||||
|
||||
/**
|
||||
* 类型描述
|
||||
*/
|
||||
private final String description;
|
||||
|
||||
/**
|
||||
* 根据类型码获取枚举
|
||||
*/
|
||||
public static RecordType getByCode(String code) {
|
||||
for (RecordType type : values()) {
|
||||
if (type.getCode().equalsIgnoreCase(code)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.mtkj.mtpay.dto.risk;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 充值信息DTO
|
||||
*/
|
||||
@Data
|
||||
public class RechargeDTO implements Serializable {
|
||||
|
||||
// 根据实际需求添加字段
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user