Skip to content

Commit 94e6d65

Browse files
jeequanbinarywang
authored and
binarywang
committed
🆕 #2562 【微信支付】增加微信消费者投诉2.0接口
1 parent 4036921 commit 94e6d65

18 files changed

+1430
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package com.github.binarywang.wxpay.bean.complaint;
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+
import java.io.Serializable;
10+
11+
/**
12+
* 微信消费者投诉2.0
13+
* 查询投诉单详情请求实体
14+
*
15+
* @author <a href="https://gitee.com/jeequan/jeepay">jmdhappy</a>
16+
* @date 2022-3-19
17+
*/
18+
@Data
19+
@Builder(builderMethodName = "newBuilder")
20+
@NoArgsConstructor
21+
@AllArgsConstructor
22+
public class ComplaintDetailRequest implements Serializable {
23+
24+
private static final long serialVersionUID = 3244929701614280801L;
25+
26+
/**
27+
* <pre>
28+
* 字段名:投诉单号
29+
* 是否必填:是
30+
* 描述:投诉单对应的投诉单号
31+
* </pre>
32+
*/
33+
@SerializedName("complaint_id")
34+
private String complaintId;
35+
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
package com.github.binarywang.wxpay.bean.complaint;
2+
3+
4+
import com.github.binarywang.wxpay.v3.SpecEncrypt;
5+
import com.google.gson.annotations.SerializedName;
6+
import lombok.Data;
7+
8+
import java.io.Serializable;
9+
import java.util.List;
10+
11+
/**
12+
* 微信消费者投诉2.0
13+
* 查询投诉单列表返回的实体
14+
*
15+
* @author <a href="https://gitee.com/jeequan/jeepay">jmdhappy</a>
16+
* @date 2022-3-19
17+
*/
18+
@Data
19+
public class ComplaintDetailResult implements Serializable {
20+
21+
private static final long serialVersionUID = -6201692411535927503L;
22+
23+
/**
24+
* <pre>
25+
* 字段名:投诉单号
26+
* 是否必填:是
27+
* 描述:投诉单对应的投诉单号
28+
* </pre>
29+
*/
30+
@SerializedName("complaint_id")
31+
private String complaintId;
32+
33+
/**
34+
* <pre>
35+
* 字段名:投诉时间
36+
* 是否必填:是
37+
* 描述:投诉时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss.sss+TIMEZONE,yyyy-MM-DD表示年月日,
38+
* T出现在字符串中,表示time元素的开头,HH:mm:ss.sss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。
39+
* 例如:2015-05-20T13:29:35.120+08:00表示北京时间2015年05月20日13点29分35秒
40+
* 示例值:2015-05-20T13:29:35.120+08:00
41+
* </pre>
42+
*/
43+
@SerializedName("complaint_time")
44+
private String complaintTime;
45+
46+
/**
47+
* <pre>
48+
* 字段名:投诉详情
49+
* 是否必填:是
50+
* 投诉的具体描述
51+
* </pre>
52+
*/
53+
@SerializedName("complaint_detail")
54+
private String complaintDetail;
55+
56+
/**
57+
* <pre>
58+
* 字段名:被诉商户号
59+
* 是否必填:是
60+
* 投诉单对应的被诉商户号。
61+
* </pre>
62+
*/
63+
@SerializedName("complainted_mchid")
64+
private String complaintedMchid;
65+
66+
/**
67+
* <pre>
68+
* 字段名:投诉单状态
69+
* 是否必填:是
70+
* 标识当前投诉单所处的处理阶段,具体状态如下所示:
71+
* PENDING:待处理
72+
* PROCESSING:处理中
73+
* PROCESSED:已处理完成
74+
* </pre>
75+
*/
76+
@SerializedName("complaint_state")
77+
private String complaintState;
78+
79+
/**
80+
* <pre>
81+
* 字段名:投诉人联系方式
82+
* 是否必填:否
83+
* 投诉人联系方式。该字段已做加密处理,具体解密方法详见敏感信息加密说明。
84+
* </pre>
85+
*/
86+
@SerializedName("payer_phone")
87+
@SpecEncrypt
88+
private String payerPhone;
89+
90+
/**
91+
* <pre>
92+
* 字段名:投诉人openid
93+
* 是否必填:是
94+
* 投诉人在商户appid下的唯一标识
95+
* </pre>
96+
*/
97+
@SerializedName("payer_openid")
98+
private String payerOpenid;
99+
100+
101+
/**
102+
* <pre>
103+
* 字段名:投诉资料列表
104+
* 是否必填:是
105+
* 用户上传的投诉相关资料,包括图片凭证等
106+
* </pre>
107+
*/
108+
@SerializedName("complaint_media_list")
109+
private List<ComplaintMedia> complaintMediaList;
110+
111+
@Data
112+
public static class ComplaintMedia implements Serializable {
113+
private static final long serialVersionUID = 4240983048700956803L;
114+
115+
/**
116+
* <pre>
117+
* 字段名:媒体文件业务类型
118+
* 是否必填:是
119+
* 描述:
120+
* 媒体文件对应的业务类型
121+
* USER_COMPLAINT_IMAGE:用户投诉图片,用户提交投诉时上传的图片凭证
122+
* OPERATION_IMAGE:操作流水图片,用户、商户、微信支付客服在协商解决投诉时,上传的图片凭证
123+
* 注:用户上传的图片凭证会以白名单的形式提供给商户,若希望查看用户图片,联系微信支付客服
124+
* 示例值:USER_COMPLAINT_IMAGE
125+
* </pre>
126+
*/
127+
@SerializedName("media_type")
128+
private String mediaType;
129+
130+
/**
131+
* <pre>
132+
* 字段名:媒体文件请求url
133+
* 是否必填:是
134+
* 描述:
135+
* 微信返回的媒体文件请求url
136+
* </pre>
137+
*/
138+
@SerializedName("media_url")
139+
private String mediaUrl;
140+
141+
}
142+
143+
/**
144+
* <pre>
145+
* 字段名:投诉单关联订单信息
146+
* 是否必填:是
147+
* 投诉单关联订单信息
148+
* 注:投诉单和订单目前是一对一关系,array是预留未来一对多的扩展
149+
* </pre>
150+
*/
151+
@SerializedName("complaint_order_info")
152+
private List<ComplaintOrder> complaintOrderInfo;
153+
154+
@Data
155+
public static class ComplaintOrder implements Serializable {
156+
private static final long serialVersionUID = 4240983048700956804L;
157+
158+
/**
159+
* <pre>
160+
* 字段名:微信订单号
161+
* 是否必填:是
162+
* 描述:
163+
* 投诉单关联的微信订单号
164+
* </pre>
165+
*/
166+
@SerializedName("transaction_id")
167+
private String transactionId;
168+
169+
/**
170+
* <pre>
171+
* 字段名:商户订单号
172+
* 是否必填:是
173+
* 描述:
174+
* 投诉单关联的商户订单号
175+
* </pre>
176+
*/
177+
@SerializedName("out_trade_no")
178+
private String outTradeNo;
179+
180+
/**
181+
* <pre>
182+
* 字段名:订单金额
183+
* 是否必填:是
184+
* 描述:
185+
* 订单金额,单位(分)
186+
* </pre>
187+
*/
188+
@SerializedName("amount")
189+
private Integer amount;
190+
191+
}
192+
193+
/**
194+
* <pre>
195+
* 字段名:投诉单是否已全额退款
196+
* 是否必填:是
197+
* 描述:
198+
* 投诉单下所有订单是否已全部全额退款
199+
* </pre>
200+
*/
201+
@SerializedName("complaint_full_refunded")
202+
private Boolean complaintFullRefunded;
203+
204+
/**
205+
* <pre>
206+
* 字段名:是否有待回复的用户留言
207+
* 是否必填:是
208+
* 描述:
209+
* 投诉单是否有待回复的用户留言
210+
* </pre>
211+
*/
212+
@SerializedName("incoming_user_response")
213+
private Boolean incomingUserResponse;
214+
215+
/**
216+
* <pre>
217+
* 字段名:问题描述
218+
* 是否必填:是
219+
* 描述:
220+
* 用户发起投诉前选择的faq标题(2021年7月15日之后的投诉单均包含此信息)
221+
* </pre>
222+
*/
223+
@SerializedName("problem_description")
224+
private String problemDescription;
225+
226+
/**
227+
* <pre>
228+
* 字段名:用户投诉次数
229+
* 是否必填:是
230+
* 描述:
231+
* 用户投诉次数。用户首次发起投诉记为1次,用户每有一次继续投诉就加1
232+
* </pre>
233+
*/
234+
@SerializedName("user_complaint_times")
235+
private Integer userComplaintTimes;
236+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package com.github.binarywang.wxpay.bean.complaint;
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+
import java.io.Serializable;
10+
11+
/**
12+
* 微信消费者投诉2.0
13+
* 投诉通知请求实体
14+
*
15+
* @author <a href="https://gitee.com/jeequan/jeepay">jmdhappy</a>
16+
* @date 2022-3-19
17+
*/
18+
@Data
19+
@Builder(builderMethodName = "newBuilder")
20+
@NoArgsConstructor
21+
@AllArgsConstructor
22+
public class ComplaintNotifyUrlRequest implements Serializable {
23+
24+
private static final long serialVersionUID = -1L;
25+
26+
/**
27+
* <pre>
28+
* 字段名:通知地址
29+
* 是否必填:是
30+
* 描述:通知地址,仅支持https。
31+
* </pre>
32+
*/
33+
@SerializedName("url")
34+
private String url;
35+
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package com.github.binarywang.wxpay.bean.complaint;
2+
3+
4+
import com.github.binarywang.wxpay.bean.media.MarketingImageUploadResult;
5+
import com.google.gson.annotations.SerializedName;
6+
import lombok.Data;
7+
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
8+
9+
import java.io.Serializable;
10+
import java.util.List;
11+
12+
/**
13+
* 微信消费者投诉2.0
14+
* 投诉通知地址返回的实体
15+
*
16+
* @author <a href="https://gitee.com/jeequan/jeepay">jmdhappy</a>
17+
* @date 2022-3-19
18+
*/
19+
@Data
20+
public class ComplaintNotifyUrlResult implements Serializable {
21+
22+
private static final long serialVersionUID = -6201692411535927502L;
23+
24+
/**
25+
* <pre>
26+
* 字段名:商户号
27+
* 是否必填:是
28+
* 描述:返回创建回调地址的商户号,由微信支付生成并下发。
29+
* </pre>
30+
*/
31+
@SerializedName("mchid")
32+
private String mchid;
33+
34+
/**
35+
* <pre>
36+
* 字段名:通知地址
37+
* 是否必填:是
38+
* 描述:通知地址,仅支持https。
39+
* </pre>
40+
*/
41+
@SerializedName("url")
42+
private String url;
43+
44+
}

0 commit comments

Comments
 (0)