Skip to content

Commit 8a376f5

Browse files
committed
重构规范化微信支付相关接口类
1 parent a3ada2c commit 8a376f5

12 files changed

+127
-164
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/pay/request/WxEntPayQueryRequest.java

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package me.chanjar.weixin.mp.bean.pay.request;
22

3-
import com.thoughtworks.xstream.annotations.XStreamAlias;
4-
import me.chanjar.weixin.common.annotation.Required;
53
import org.apache.commons.lang3.builder.ToStringBuilder;
64
import org.apache.commons.lang3.builder.ToStringStyle;
75

6+
import com.thoughtworks.xstream.annotations.XStreamAlias;
7+
8+
import me.chanjar.weixin.common.annotation.Required;
9+
810
/**
911
* <pre>
1012
* 企业付款请求对象
@@ -31,6 +33,7 @@ public class WxEntPayQueryRequest extends WxPayBaseRequest {
3133
* 微信支付分配的商户号
3234
* </pre>
3335
*/
36+
@SuppressWarnings("hiding")
3437
@XStreamAlias("mchid")
3538
private String mchId;
3639

@@ -48,40 +51,18 @@ public class WxEntPayQueryRequest extends WxPayBaseRequest {
4851
@XStreamAlias("partner_trade_no")
4952
private String partnerTradeNo;
5053

51-
public String getAppid() {
52-
return appid;
53-
}
54-
55-
public void setAppid(String appid) {
56-
this.appid = appid;
57-
}
58-
54+
@Override
5955
public String getMchId() {
60-
return mchId;
56+
return this.mchId;
6157
}
6258

59+
@Override
6360
public void setMchId(String mchId) {
6461
this.mchId = mchId;
6562
}
6663

67-
public String getNonceStr() {
68-
return nonceStr;
69-
}
70-
71-
public void setNonceStr(String nonceStr) {
72-
this.nonceStr = nonceStr;
73-
}
74-
75-
public String getSign() {
76-
return sign;
77-
}
78-
79-
public void setSign(String sign) {
80-
this.sign = sign;
81-
}
82-
8364
public String getPartnerTradeNo() {
84-
return partnerTradeNo;
65+
return this.partnerTradeNo;
8566
}
8667

8768
public void setPartnerTradeNo(String partnerTradeNo) {

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/pay/request/WxEntPayRequest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,95 +181,95 @@ public class WxEntPayRequest {
181181
private String spbillCreateIp;
182182

183183
public String getMchAppid() {
184-
return mchAppid;
184+
return this.mchAppid;
185185
}
186186

187187
public void setMchAppid(String mchAppid) {
188188
this.mchAppid = mchAppid;
189189
}
190190

191191
public String getMchId() {
192-
return mchId;
192+
return this.mchId;
193193
}
194194

195195
public void setMchId(String mchId) {
196196
this.mchId = mchId;
197197
}
198198

199199
public String getDeviceInfo() {
200-
return deviceInfo;
200+
return this.deviceInfo;
201201
}
202202

203203
public void setDeviceInfo(String deviceInfo) {
204204
this.deviceInfo = deviceInfo;
205205
}
206206

207207
public String getNonceStr() {
208-
return nonceStr;
208+
return this.nonceStr;
209209
}
210210

211211
public void setNonceStr(String nonceStr) {
212212
this.nonceStr = nonceStr;
213213
}
214214

215215
public String getSign() {
216-
return sign;
216+
return this.sign;
217217
}
218218

219219
public void setSign(String sign) {
220220
this.sign = sign;
221221
}
222222

223223
public String getPartnerTradeNo() {
224-
return partnerTradeNo;
224+
return this.partnerTradeNo;
225225
}
226226

227227
public void setPartnerTradeNo(String partnerTradeNo) {
228228
this.partnerTradeNo = partnerTradeNo;
229229
}
230230

231231
public String getOpenid() {
232-
return openid;
232+
return this.openid;
233233
}
234234

235235
public void setOpenid(String openid) {
236236
this.openid = openid;
237237
}
238238

239239
public String getCheckName() {
240-
return checkName;
240+
return this.checkName;
241241
}
242242

243243
public void setCheckName(String checkName) {
244244
this.checkName = checkName;
245245
}
246246

247247
public String getReUserName() {
248-
return reUserName;
248+
return this.reUserName;
249249
}
250250

251251
public void setReUserName(String reUserName) {
252252
this.reUserName = reUserName;
253253
}
254254

255255
public Integer getAmount() {
256-
return amount;
256+
return this.amount;
257257
}
258258

259259
public void setAmount(Integer amount) {
260260
this.amount = amount;
261261
}
262262

263263
public String getDescription() {
264-
return description;
264+
return this.description;
265265
}
266266

267267
public void setDescription(String description) {
268268
this.description = description;
269269
}
270270

271271
public String getSpbillCreateIp() {
272-
return spbillCreateIp;
272+
return this.spbillCreateIp;
273273
}
274274

275275
public void setSpbillCreateIp(String spbillCreateIp) {

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/pay/request/WxPayBaseRequest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package me.chanjar.weixin.mp.bean.pay.request;
22

3-
import com.thoughtworks.xstream.annotations.XStreamAlias;
43
import org.apache.commons.lang3.builder.ToStringBuilder;
54
import org.apache.commons.lang3.builder.ToStringStyle;
65

6+
import com.thoughtworks.xstream.annotations.XStreamAlias;
7+
78
/**
89
* <pre>
910
* Created by Binary Wang on 2016-10-24.
@@ -69,31 +70,31 @@ public abstract class WxPayBaseRequest {
6970
protected String sign;
7071

7172
public String getAppid() {
72-
return appid;
73+
return this.appid;
7374
}
7475

7576
public void setAppid(String appid) {
7677
this.appid = appid;
7778
}
7879

7980
public String getMchId() {
80-
return mchId;
81+
return this.mchId;
8182
}
8283

8384
public void setMchId(String mchId) {
8485
this.mchId = mchId;
8586
}
8687

8788
public String getNonceStr() {
88-
return nonceStr;
89+
return this.nonceStr;
8990
}
9091

9192
public void setNonceStr(String nonceStr) {
9293
this.nonceStr = nonceStr;
9394
}
9495

9596
public String getSign() {
96-
return sign;
97+
return this.sign;
9798
}
9899

99100
public void setSign(String sign) {

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/pay/request/WxPayOrderQueryRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ public class WxPayOrderQueryRequest extends WxPayBaseRequest {
4646
private String outTradeNo;
4747

4848
public String getTransactionId() {
49-
return transactionId;
49+
return this.transactionId;
5050
}
5151

5252
public void setTransactionId(String transactionId) {
5353
this.transactionId = transactionId;
5454
}
5555

5656
public String getOutTradeNo() {
57-
return outTradeNo;
57+
return this.outTradeNo;
5858
}
5959

6060
public void setOutTradeNo(String outTradeNo) {

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/pay/request/WxPayRefundRequest.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package me.chanjar.weixin.mp.bean.pay.request;
22

33
import com.thoughtworks.xstream.annotations.XStreamAlias;
4+
45
import me.chanjar.weixin.common.annotation.Required;
56

67
/**
@@ -196,103 +197,103 @@ public class WxPayRefundRequest {
196197
private String refundAccount;
197198

198199
public String getAppid() {
199-
return appid;
200+
return this.appid;
200201
}
201202

202203
public void setAppid(String appid) {
203204
this.appid = appid;
204205
}
205206

206207
public String getMchId() {
207-
return mchId;
208+
return this.mchId;
208209
}
209210

210211
public void setMchId(String mchId) {
211212
this.mchId = mchId;
212213
}
213214

214215
public String getDeviceInfo() {
215-
return deviceInfo;
216+
return this.deviceInfo;
216217
}
217218

218219
public void setDeviceInfo(String deviceInfo) {
219220
this.deviceInfo = deviceInfo;
220221
}
221222

222223
public String getNonceStr() {
223-
return nonceStr;
224+
return this.nonceStr;
224225
}
225226

226227
public void setNonceStr(String nonceStr) {
227228
this.nonceStr = nonceStr;
228229
}
229230

230231
public String getSign() {
231-
return sign;
232+
return this.sign;
232233
}
233234

234235
public void setSign(String sign) {
235236
this.sign = sign;
236237
}
237238

238239
public String getTransactionId() {
239-
return transactionId;
240+
return this.transactionId;
240241
}
241242

242243
public void setTransactionId(String transactionId) {
243244
this.transactionId = transactionId;
244245
}
245246

246247
public String getOutTradeNo() {
247-
return outTradeNo;
248+
return this.outTradeNo;
248249
}
249250

250251
public void setOutTradeNo(String outTradeNo) {
251252
this.outTradeNo = outTradeNo;
252253
}
253254

254255
public String getOutRefundNo() {
255-
return outRefundNo;
256+
return this.outRefundNo;
256257
}
257258

258259
public void setOutRefundNo(String outRefundNo) {
259260
this.outRefundNo = outRefundNo;
260261
}
261262

262263
public Integer getTotalFee() {
263-
return totalFee;
264+
return this.totalFee;
264265
}
265266

266267
public void setTotalFee(Integer totalFee) {
267268
this.totalFee = totalFee;
268269
}
269270

270271
public Integer getRefundFee() {
271-
return refundFee;
272+
return this.refundFee;
272273
}
273274

274275
public void setRefundFee(Integer refundFee) {
275276
this.refundFee = refundFee;
276277
}
277278

278279
public String getRefundFeeType() {
279-
return refundFeeType;
280+
return this.refundFeeType;
280281
}
281282

282283
public void setRefundFeeType(String refundFeeType) {
283284
this.refundFeeType = refundFeeType;
284285
}
285286

286287
public String getOpUserId() {
287-
return opUserId;
288+
return this.opUserId;
288289
}
289290

290291
public void setOpUserId(String opUserId) {
291292
this.opUserId = opUserId;
292293
}
293294

294295
public String getRefundAccount() {
295-
return refundAccount;
296+
return this.refundAccount;
296297
}
297298

298299
public void setRefundAccount(String refundAccount) {

0 commit comments

Comments
 (0)