Skip to content

Commit d3edb44

Browse files
committed
初步定义好发送红包的请求对象类
1 parent 748a81b commit d3edb44

1 file changed

Lines changed: 159 additions & 0 deletions

File tree

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
package me.chanjar.weixin.mp.bean.pay;
2+
3+
import com.thoughtworks.xstream.annotations.XStreamAlias;
4+
5+
/**
6+
* 发送红包请求参数对象
7+
* Created by Binary Wang on 2016/9/24.
8+
* @author binarywang (https://github.com/binarywang)
9+
*/
10+
@XStreamAlias("xml")
11+
public class WxSendRedpackRequest {
12+
/**
13+
* mch_billno
14+
* 商户订单号(每个订单号必须唯一) 组成:mch_id+yyyymmdd+10位一天内不能重复的数字。 接口根据商户订单号支持重入,如出现超时可再调用。
15+
*/
16+
@XStreamAlias("mch_billno")
17+
private String mchBillno;
18+
19+
/**
20+
* send_name
21+
* 商户名称
22+
* 红包发送者名称
23+
*/
24+
@XStreamAlias("send_name")
25+
private String sendName;
26+
27+
/**
28+
* re_openid
29+
* 接受红包的用户 用户在wxappid下的openid
30+
*/
31+
@XStreamAlias("re_openid")
32+
private String reOpenid;
33+
34+
/**
35+
* total_amount
36+
* 红包总额
37+
*/
38+
@XStreamAlias("total_amount")
39+
private Integer totalAmount;
40+
41+
/**
42+
* total_num
43+
* 红包发放总人数
44+
*/
45+
@XStreamAlias("total_num")
46+
private Integer totalNum;
47+
48+
/**
49+
* amt_type
50+
* 红包金额设置方式
51+
* ALL_RAND—全部随机,商户指定总金额和红包发放总人数,由微信支付随机计算出各红包金额
52+
* 裂变红包必填
53+
*/
54+
@XStreamAlias("amt_type")
55+
private String amtType;
56+
57+
/**
58+
* wishing
59+
* 红包祝福语
60+
*/
61+
@XStreamAlias("wishing")
62+
private String wishing;
63+
64+
/**
65+
* client_ip
66+
* 服务器Ip地址
67+
* 调用接口的机器Ip地址
68+
*/
69+
@XStreamAlias("client_ip")
70+
private String clientIp;
71+
72+
/**
73+
* act_name
74+
* 活动名称
75+
*/
76+
@XStreamAlias("act_name")
77+
private String actName;
78+
79+
/**
80+
* remark
81+
* 备注
82+
*/
83+
@XStreamAlias("remark")
84+
private String remark;
85+
86+
/**
87+
* wxappid
88+
* 微信分配的公众账号ID(企业号corpid即为此appId)。接口传入的所有appid应该为公众号的appid(在mp.weixin.qq.com申请的),不能为APP的appid(在open.weixin.qq.com申请的)
89+
*/
90+
@XStreamAlias("wxappid")
91+
private String wxAppid;
92+
93+
/**
94+
* mch_id
95+
* 微信支付分配的商户号
96+
*/
97+
@XStreamAlias("mch_id")
98+
private String mchId;
99+
100+
/**
101+
* nonce_str
102+
* 随机字符串,不长于32位
103+
*/
104+
@XStreamAlias("nonce_str")
105+
private String nonceStr;
106+
107+
/**
108+
* sign
109+
* 详见<a href="https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=4_3">签名生成算法</a>
110+
*/
111+
@XStreamAlias("sign")
112+
private String sign;
113+
114+
/**
115+
* <pre>
116+
* scene_id
117+
* 场景id
118+
* PRODUCT_1:商品促销
119+
* PRODUCT_2:抽奖
120+
* PRODUCT_3:虚拟物品兑奖
121+
* PRODUCT_4:企业内部福利
122+
* PRODUCT_5:渠道分润
123+
* PRODUCT_6:保险回馈
124+
* PRODUCT_7:彩票派奖
125+
* PRODUCT_8:税务刮奖
126+
* 非必填字段
127+
* </pre>
128+
*/
129+
@XStreamAlias("scene_id")
130+
private String sceneId;
131+
132+
/**
133+
* <pre>
134+
* risk_info
135+
* 活动信息
136+
* posttime:用户操作的时间戳
137+
* mobile:业务系统账号的手机号,国家代码-手机号。不需要+号
138+
* deviceid :mac 地址或者设备唯一标识
139+
* clientversion :用户操作的客户端版本
140+
* 把值为非空的信息用key=value进行拼接,再进行urlencode
141+
* urlencode(posttime=xx&mobile=xx&deviceid=xx)
142+
* 非必填字段
143+
* </pre>
144+
*/
145+
@XStreamAlias("risk_info")
146+
private String riskInfo;
147+
148+
/**
149+
* <pre>
150+
* consume_mch_id
151+
* 资金授权商户号
152+
* 资金授权商户号
153+
* 服务商替特约商户发放时使用
154+
* 非必填字段
155+
* </pre>
156+
*/
157+
@XStreamAlias("consume_mch_id")
158+
private String consumeMchId;
159+
}

0 commit comments

Comments
 (0)