Skip to content

Commit 3e60f60

Browse files
committed
feat(微信支付): 医保退款通知,医保混合收款成功通知
1 parent cb6cb57 commit 3e60f60

File tree

5 files changed

+538
-5
lines changed

5 files changed

+538
-5
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
package com.github.binarywang.wxpay.bean.mipay;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.AllArgsConstructor;
5+
import lombok.Builder;
6+
import lombok.Data;
7+
import lombok.NoArgsConstructor;
8+
9+
/**
10+
* 医保退款通知请求
11+
* <p>
12+
* 从业机构调用该接口向微信医保后台通知医保订单的退款成功结果
13+
* 文档地址:https://pay.weixin.qq.com/doc/v3/partner/4012166534
14+
* @author xgl
15+
* @date 2025/12/20
16+
*/
17+
@Data
18+
@Builder(builderMethodName = "newBuilder")
19+
@NoArgsConstructor
20+
@AllArgsConstructor
21+
public class MedInsRefundNotifyRequest {
22+
23+
/**
24+
* <pre>
25+
* 字段名:医保自费混合订单号
26+
* 必填:是
27+
* 类型:string(32)
28+
* 描述:医保自费混合订单号
29+
* </pre>
30+
*/
31+
private String mixTradeNo;
32+
33+
/**
34+
* <pre>
35+
* 字段名:医疗机构的商户号
36+
* 变量名:sub_mchid
37+
* 必填:是
38+
* 类型:string(32)
39+
* 描述:医疗机构的商户号
40+
* </pre>
41+
*/
42+
@SerializedName("sub_mchid")
43+
private String subMchid;
44+
45+
/**
46+
* <pre>
47+
* 字段名:医保退款的总金额
48+
* 变量名:med_refund_total_fee
49+
* 必填:是
50+
* 类型:integer
51+
* 描述:单位分,医保退款的总金额。
52+
* </pre>
53+
*/
54+
@SerializedName("med_refund_total_fee")
55+
private Integer medRefundTotalFee;
56+
57+
/**
58+
* <pre>
59+
* 字段名:医保统筹退款金额
60+
* 变量名:med_refund_gov_fee
61+
* 必填:是
62+
* 类型:integer
63+
* 描述:单位分,医保统筹退款金额。
64+
* </pre>
65+
*/
66+
@SerializedName("med_refund_gov_fee")
67+
private Integer medRefundGovFee;
68+
69+
/**
70+
* <pre>
71+
* 字段名:医保个账退款金额
72+
* 变量名:med_refund_self_fee
73+
* 必填:是
74+
* 类型:integer
75+
* 描述:单位分,医保个账退款金额。
76+
* </pre>
77+
*/
78+
@SerializedName("med_refund_self_fee")
79+
private Integer medRefundSelfFee;
80+
81+
/**
82+
* <pre>
83+
* 字段名:医保其他退款金额
84+
* 变量名:med_refund_other_fee
85+
* 必填:是
86+
* 类型:integer
87+
* 描述:单位分,医保其他退款金额。
88+
* </pre>
89+
*/
90+
@SerializedName("med_refund_other_fee")
91+
private Integer medRefundOtherFee;
92+
93+
/**
94+
* <pre>
95+
* 字段名:医保退款成功时间
96+
* 变量名:refund_time
97+
* 必填:是
98+
* 类型:string(64)
99+
* 描述:遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE。
100+
* </pre>
101+
*/
102+
@SerializedName("refund_time")
103+
private String refundTime;
104+
105+
/**
106+
* <pre>
107+
* 字段名:从业机构\服务商退款单号
108+
* 变量名:out_refund_no
109+
* 必填:是
110+
* 类型:string(64)
111+
* 描述:有自费单时,从业机构\服务商应填与自费退款申请处一致的out_refund_no。否则从业机构透传医疗机构退款单号即可。
112+
* </pre>
113+
*/
114+
@SerializedName("out_refund_no")
115+
private String outRefundNo;
116+
}
Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
package com.github.binarywang.wxpay.bean.notify;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* <pre>
11+
* 医保混合收款成功通知结果
12+
* 文档地址:https://pay.weixin.qq.com/doc/v3/partner/4012165722
13+
* </pre>
14+
*
15+
* @author xgl
16+
* @date 2025/12/20
17+
*/
18+
@Data
19+
@NoArgsConstructor
20+
public class MiPayNotifyV3Result implements Serializable, WxPayBaseNotifyV3Result<MiPayNotifyV3Result.DecryptNotifyResult> {
21+
22+
/**
23+
* 源数据
24+
*/
25+
private OriginNotifyResponse rawData;
26+
27+
/**
28+
* 解密后的数据
29+
*/
30+
private DecryptNotifyResult result;
31+
32+
@Data
33+
@NoArgsConstructor
34+
public static class DecryptNotifyResult implements Serializable {
35+
private static final long serialVersionUID = 1L;
36+
37+
/**
38+
* <pre>
39+
* 字段名:应用ID
40+
* 变量名:appid
41+
* 是否必填:是
42+
* 类型:string(32)
43+
* 描述:
44+
* 从业机构/服务商的公众号ID
45+
* </pre>
46+
*/
47+
@SerializedName(value = "appid")
48+
private String appid;
49+
50+
/**
51+
* <pre>
52+
* 字段名:医疗机构的公众号ID
53+
* 变量名:sub_appid
54+
* 是否必填:是
55+
* 类型:string(32)
56+
* 描述:
57+
* 医疗机构的公众号ID
58+
* </pre>
59+
*/
60+
@SerializedName(value = "sub_appid")
61+
private String subAppid;
62+
63+
/**
64+
* <pre>
65+
* 字段名:医疗机构的商户号
66+
* 变量名:sub_mchid
67+
* 是否必填:是
68+
* 类型:string(32)
69+
* 描述:
70+
* 医疗机构的商户号
71+
* </pre>
72+
*/
73+
@SerializedName(value = "sub_mchid")
74+
private String subMchid;
75+
76+
/**
77+
* <pre>
78+
* 字段名:从业机构订单号
79+
* 变量名:out_trade_no
80+
* 是否必填:是
81+
* 类型:string(64)
82+
* 描述:
83+
* 从业机构/服务商订单号
84+
* </pre>
85+
*/
86+
@SerializedName(value = "out_trade_no")
87+
private String outTradeNo;
88+
89+
/**
90+
* <pre>
91+
* 字段名:医保自费混合订单号
92+
* 变量名:mix_trade_no
93+
* 是否必填:是
94+
* 类型:string(32)
95+
* 描述:
96+
* 微信支付系统生成的医保自费混合订单号
97+
* </pre>
98+
*/
99+
@SerializedName(value = "mix_trade_no")
100+
private String mixTradeNo;
101+
102+
/**
103+
* <pre>
104+
* 字段名:微信支付订单号
105+
* 变量名:transaction_id
106+
* 是否必填:是
107+
* 类型:string(32)
108+
* 描述:
109+
* 微信支付系统生成的订单号
110+
* </pre>
111+
*/
112+
@SerializedName(value = "transaction_id")
113+
private String transactionId;
114+
115+
/**
116+
* <pre>
117+
* 字段名:医保订单创建时间
118+
* 变量名:med_ins_order_create_time
119+
* 是否必填:是
120+
* 类型:string(64)
121+
* 描述:
122+
* 医保订单创建时间,遵循rfc3339标准格式
123+
* </pre>
124+
*/
125+
@SerializedName(value = "med_ins_order_create_time")
126+
private String medInsOrderCreateTime;
127+
128+
/**
129+
* <pre>
130+
* 字段名:医保订单完成时间
131+
* 变量名:med_ins_order_finish_time
132+
* 是否必填:是
133+
* 类型:string(64)
134+
* 描述:
135+
* 医保订单完成时间,遵循rfc3339标准格式
136+
* </pre>
137+
*/
138+
@SerializedName(value = "med_ins_order_finish_time")
139+
private String medInsOrderFinishTime;
140+
141+
/**
142+
* <pre>
143+
* 字段名:总金额
144+
* 变量名:total_fee
145+
* 是否必填:否
146+
* 类型:long
147+
* 描述:
148+
* 总金额,单位为分
149+
* </pre>
150+
*/
151+
@SerializedName(value = "total_fee")
152+
private Long totalFee;
153+
154+
/**
155+
* <pre>
156+
* 字段名:医保统筹基金支付金额
157+
* 变量名:med_ins_gov_fee
158+
* 是否必填:否
159+
* 类型:long
160+
* 描述:
161+
* 医保统筹基金支付金额,单位为分
162+
* </pre>
163+
*/
164+
@SerializedName(value = "med_ins_gov_fee")
165+
private Long medInsGovFee;
166+
167+
/**
168+
* <pre>
169+
* 字段名:医保个人账户支付金额
170+
* 变量名:med_ins_self_fee
171+
* 是否必填:否
172+
* 类型:long
173+
* 描述:
174+
* 医保个人账户支付金额,单位为分
175+
* </pre>
176+
*/
177+
@SerializedName(value = "med_ins_self_fee")
178+
private Long medInsSelfFee;
179+
180+
/**
181+
* <pre>
182+
* 字段名:医保其他基金支付金额
183+
* 变量名:med_ins_other_fee
184+
* 是否必填:否
185+
* 类型:long
186+
* 描述:
187+
* 医保其他基金支付金额,单位为分
188+
* </pre>
189+
*/
190+
@SerializedName(value = "med_ins_other_fee")
191+
private Long medInsOtherFee;
192+
193+
/**
194+
* <pre>
195+
* 字段名:医保现金支付金额
196+
* 变量名:med_ins_cash_fee
197+
* 是否必填:否
198+
* 类型:long
199+
* 描述:
200+
* 医保现金支付金额,单位为分
201+
* </pre>
202+
*/
203+
@SerializedName(value = "med_ins_cash_fee")
204+
private Long medInsCashFee;
205+
206+
/**
207+
* <pre>
208+
* 字段名:微信支付现金支付金额
209+
* 变量名:wechat_pay_cash_fee
210+
* 是否必填:否
211+
* 类型:long
212+
* 描述:
213+
* 微信支付现金支付金额,单位为分
214+
* </pre>
215+
*/
216+
@SerializedName(value = "wechat_pay_cash_fee")
217+
private Long wechatPayCashFee;
218+
219+
/**
220+
* <pre>
221+
* 字段名:附加数据
222+
* 变量名:attach
223+
* 是否必填:否
224+
* 类型:string(128)
225+
* 描述:
226+
* 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用
227+
* </pre>
228+
*/
229+
@SerializedName(value = "attach")
230+
private String attach;
231+
232+
/**
233+
* <pre>
234+
* 字段名:支付状态
235+
* 变量名:trade_state
236+
* 是否必填:是
237+
* 类型:string(32)
238+
* 描述:
239+
* 交易状态,枚举值:
240+
* SUCCESS:支付成功
241+
* REFUND:转入退款
242+
* NOTPAY:未支付
243+
* CLOSED:已关闭
244+
* REVOKED:已撤销
245+
* USERPAYING:用户支付中
246+
* PAYERROR:支付失败
247+
* </pre>
248+
*/
249+
@SerializedName(value = "trade_state")
250+
private String tradeState;
251+
252+
/**
253+
* <pre>
254+
* 字段名:支付状态描述
255+
* 变量名:trade_state_desc
256+
* 是否必填:是
257+
* 类型:string(256)
258+
* 描述:
259+
* 交易状态描述
260+
* </pre>
261+
*/
262+
@SerializedName(value = "trade_state_desc")
263+
private String tradeStateDesc;
264+
}
265+
}

0 commit comments

Comments
 (0)