| package com.dy.pipIrrSell.wechatpay.dto; | 
|   | 
| import io.swagger.v3.oas.annotations.media.Schema; | 
| import jakarta.validation.constraints.NotBlank; | 
| import jakarta.validation.constraints.NotNull; | 
| import lombok.Data; | 
|   | 
| /** | 
|  * @author ZhuBaoMin | 
|  * @date 2024-03-06 13:55 | 
|  * @LastEditTime 2024-03-06 13:55 | 
|  * @Description 退款请求对象,对象赋值完整后向微信请求退款 | 
|  */ | 
|   | 
| @Data | 
| @Schema(name = "退款请求对象") | 
| public class RefundRequest { | 
|     public static final long serialVersionUID = 202403011540001L; | 
|   | 
|     /** | 
|      * 商户订单号,下单时的订单号 | 
|      */ | 
|     @Schema(description = "商户订单号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|     @NotBlank(message = "商户订单号不能为空") | 
|     private String out_trade_no; | 
|   | 
|     /** | 
|      * 商户退款单号,订单号前加前缀“R” | 
|      */ | 
|     @Schema(description = "商户退款单号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|     @NotBlank(message = "商户退款单号不能为空") | 
|     private String out_refund_no; | 
|   | 
|     /** | 
|      * 退款结果回调url,refundUrl | 
|      */ | 
|     @Schema(description = "退款结果回调url", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|     @NotBlank(message = "退款结果回调url不能为空") | 
|     private String notify_url; | 
|   | 
|     /** | 
|      * 金额信息 | 
|      */ | 
|     @Schema(description = "金额信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|     private Amount amount; | 
|   | 
|     @Data | 
|     public static class Amount { | 
|         /** | 
|          * 退款金额 | 
|          */ | 
|         @Schema(description = "退款金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|         @NotNull(message = "退款金额不能为空") | 
|         private Integer refund; | 
|   | 
|         /** | 
|          * 原订单金额,根据订单号查询 | 
|          */ | 
|         @Schema(description = "原订单金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|         @NotNull(message = "原订单金额不能为空") | 
|         private Integer total; | 
|   | 
|         /** | 
|          * 退款币种,固定为“CNY” | 
|          */ | 
|         @Schema(description = "退款币种", requiredMode = Schema.RequiredMode.NOT_REQUIRED) | 
|         @NotBlank(message = "退款币种不能为空") | 
|         private String currency; | 
|     } | 
| } |