feat(payment): 初始化支付模块核心代码

- 添加支付常量类PaymentConstants,定义支付状态、微信、支付宝、银联等相关常量
- 创建微信支付类型常量类WechatPayType,支持JSAPI、NATIVE、H5、APP支付方式
- 新增支付控制器PaymentController,提供创建支付、查询状态、退款等统一接口
- 实现支付回调控制器PaymentNotifyController,处理微信、支付宝、银联异步通知
- 添加支付请求数据传输对象PaymentRequest,支持多种支付方式参数校验
- 定义支付响应、状态更新请求等相关DTO类- 集成Swagger注解,完善接口文档说明- 添加参数校验和异常处理机制,确保支付流程安全可靠
This commit is contained in:
2025-11-03 12:31:47 +08:00
parent 894b4bf7ce
commit 5749fab9e8
25 changed files with 4952 additions and 9 deletions

View File

@@ -0,0 +1,41 @@
package com.gxwebsoft.payment.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
/**
* 支付状态更新请求DTO
* 用于手动更新支付状态的请求参数
*
* @author 科技小王子
* @since 2025-01-26
*/
@Data
@Schema(name = "支付状态更新请求", description = "用于手动更新支付状态")
public class PaymentStatusUpdateRequest {
@Schema(description = "订单号", required = true, example = "ORDER_1756544921075")
@NotBlank(message = "订单号不能为空")
private String orderNo;
@Schema(description = "租户ID", required = true, example = "10398")
@NotNull(message = "租户ID不能为空")
@Positive(message = "租户ID必须为正数")
private Integer tenantId;
@Schema(description = "第三方交易号", example = "4200001234567890123")
private String transactionId;
@Schema(description = "支付时间", example = "2025-01-26T10:30:00")
private String payTime;
@Override
public String toString() {
return String.format("PaymentStatusUpdateRequest{orderNo='%s', tenantId=%d, transactionId='%s', payTime='%s'}",
orderNo, tenantId, transactionId, payTime);
}
}