|
2 | 2 |
|
3 | 3 | import com.github.binarywang.wxpay.bean.request.WxPayBaseRequest; |
4 | 4 | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| 5 | +import lombok.*; |
5 | 6 | import me.chanjar.weixin.common.annotation.Required; |
6 | 7 |
|
7 | 8 | /** |
|
12 | 13 | * |
13 | 14 | * @author <a href="https://github.com/binarywang">Binary Wang</a> |
14 | 15 | */ |
| 16 | +@Data |
| 17 | +@EqualsAndHashCode(callSuper = true) |
| 18 | +@Builder(builderMethodName = "newBuilder") |
| 19 | +@NoArgsConstructor |
| 20 | +@AllArgsConstructor |
15 | 21 | @XStreamAlias("xml") |
16 | | -public class WxPayCouponInfoQueryRequest extends WxPayBaseRequest { |
| 22 | +public class WxPayCouponInfoQueryRequest extends WxPayBaseRequest { |
17 | 23 | /** |
18 | 24 | * <pre> |
19 | 25 | * 字段名:代金券id |
@@ -108,173 +114,10 @@ public class WxPayCouponInfoQueryRequest extends WxPayBaseRequest { |
108 | 114 | @XStreamAlias("type") |
109 | 115 | private String type; |
110 | 116 |
|
111 | | - private WxPayCouponInfoQueryRequest(Builder builder) { |
112 | | - setAppid(builder.appid); |
113 | | - setMchId(builder.mchId); |
114 | | - setSubAppId(builder.subAppId); |
115 | | - setSubMchId(builder.subMchId); |
116 | | - setNonceStr(builder.nonceStr); |
117 | | - setSign(builder.sign); |
118 | | - setCouponId(builder.couponId); |
119 | | - setStockId(builder.stockId); |
120 | | - setOpenid(builder.openid); |
121 | | - setOpUserId(builder.opUserId); |
122 | | - setDeviceInfo(builder.deviceInfo); |
123 | | - setVersion(builder.version); |
124 | | - setType(builder.type); |
125 | | - } |
126 | | - |
127 | | - public static Builder newBuilder() { |
128 | | - return new Builder(); |
129 | | - } |
130 | | - |
131 | | - public String getCouponId() { |
132 | | - return this.couponId; |
133 | | - } |
134 | | - |
135 | | - public void setCouponId(String couponId) { |
136 | | - this.couponId = couponId; |
137 | | - } |
138 | | - |
139 | | - public String getStockId() { |
140 | | - return this.stockId; |
141 | | - } |
142 | | - |
143 | | - public void setStockId(String stockId) { |
144 | | - this.stockId = stockId; |
145 | | - } |
146 | | - |
147 | | - public String getOpenid() { |
148 | | - return this.openid; |
149 | | - } |
150 | | - |
151 | | - public void setOpenid(String openid) { |
152 | | - this.openid = openid; |
153 | | - } |
154 | | - |
155 | | - public String getOpUserId() { |
156 | | - return this.opUserId; |
157 | | - } |
158 | | - |
159 | | - public void setOpUserId(String opUserId) { |
160 | | - this.opUserId = opUserId; |
161 | | - } |
162 | | - |
163 | | - public String getDeviceInfo() { |
164 | | - return this.deviceInfo; |
165 | | - } |
166 | | - |
167 | | - public void setDeviceInfo(String deviceInfo) { |
168 | | - this.deviceInfo = deviceInfo; |
169 | | - } |
170 | | - |
171 | | - public String getVersion() { |
172 | | - return this.version; |
173 | | - } |
174 | | - |
175 | | - public void setVersion(String version) { |
176 | | - this.version = version; |
177 | | - } |
178 | | - |
179 | | - public String getType() { |
180 | | - return this.type; |
181 | | - } |
182 | | - |
183 | | - public void setType(String type) { |
184 | | - this.type = type; |
185 | | - } |
186 | 117 |
|
187 | 118 | @Override |
188 | 119 | protected void checkConstraints() { |
189 | 120 | //do nothing |
190 | 121 | } |
191 | 122 |
|
192 | | - |
193 | | - public static final class Builder { |
194 | | - private String appid; |
195 | | - private String mchId; |
196 | | - private String subAppId; |
197 | | - private String subMchId; |
198 | | - private String nonceStr; |
199 | | - private String sign; |
200 | | - private String couponId; |
201 | | - private String stockId; |
202 | | - private String openid; |
203 | | - private String opUserId; |
204 | | - private String deviceInfo; |
205 | | - private String version; |
206 | | - private String type; |
207 | | - |
208 | | - private Builder() { |
209 | | - } |
210 | | - |
211 | | - public Builder appid(String appid) { |
212 | | - this.appid = appid; |
213 | | - return this; |
214 | | - } |
215 | | - |
216 | | - public Builder mchId(String mchId) { |
217 | | - this.mchId = mchId; |
218 | | - return this; |
219 | | - } |
220 | | - |
221 | | - public Builder subAppId(String subAppId) { |
222 | | - this.subAppId = subAppId; |
223 | | - return this; |
224 | | - } |
225 | | - |
226 | | - public Builder subMchId(String subMchId) { |
227 | | - this.subMchId = subMchId; |
228 | | - return this; |
229 | | - } |
230 | | - |
231 | | - public Builder nonceStr(String nonceStr) { |
232 | | - this.nonceStr = nonceStr; |
233 | | - return this; |
234 | | - } |
235 | | - |
236 | | - public Builder sign(String sign) { |
237 | | - this.sign = sign; |
238 | | - return this; |
239 | | - } |
240 | | - |
241 | | - public Builder couponId(String couponId) { |
242 | | - this.couponId = couponId; |
243 | | - return this; |
244 | | - } |
245 | | - |
246 | | - public Builder stockId(String stockId) { |
247 | | - this.stockId = stockId; |
248 | | - return this; |
249 | | - } |
250 | | - |
251 | | - public Builder openid(String openid) { |
252 | | - this.openid = openid; |
253 | | - return this; |
254 | | - } |
255 | | - |
256 | | - public Builder opUserId(String opUserId) { |
257 | | - this.opUserId = opUserId; |
258 | | - return this; |
259 | | - } |
260 | | - |
261 | | - public Builder deviceInfo(String deviceInfo) { |
262 | | - this.deviceInfo = deviceInfo; |
263 | | - return this; |
264 | | - } |
265 | | - |
266 | | - public Builder version(String version) { |
267 | | - this.version = version; |
268 | | - return this; |
269 | | - } |
270 | | - |
271 | | - public Builder type(String type) { |
272 | | - this.type = type; |
273 | | - return this; |
274 | | - } |
275 | | - |
276 | | - public WxPayCouponInfoQueryRequest build() { |
277 | | - return new WxPayCouponInfoQueryRequest(this); |
278 | | - } |
279 | | - } |
280 | 123 | } |
0 commit comments