Skip to content

Commit ecc407a

Browse files
committed
🐛 binarywang#1161 微信支付修复EntPayRequest类的toString方法问题
1 parent d1586ae commit ecc407a

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRequest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
@AllArgsConstructor
2626
@XStreamAlias("xml")
2727
public class EntPayRequest extends BaseWxPayRequest {
28+
private static final long serialVersionUID = 8647710192770447579L;
29+
2830
/**
2931
* <pre>
3032
* 字段名:公众账号appid.
@@ -189,11 +191,6 @@ public void setMchId(String mchId) {
189191
this.mchId = mchId;
190192
}
191193

192-
@Override
193-
public String toString() {
194-
return WxGsonBuilder.create().toJson(this);
195-
}
196-
197194
@Override
198195
protected String[] getIgnoredParamsForSign() {
199196
return new String[]{"sign_type"};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.github.binarywang.wxpay.bean.entpay;
2+
3+
import org.testng.annotations.Test;
4+
5+
import static org.testng.Assert.*;
6+
7+
/**
8+
* .
9+
*
10+
* @author <a href="https://github.com/binarywang">Binary Wang</a>
11+
* @date 2019-08-18
12+
*/
13+
public class EntPayRequestTest {
14+
15+
@Test
16+
public void testToString() {
17+
System.out.println(EntPayRequest.newBuilder().mchId("123").build().toString());
18+
}
19+
}

0 commit comments

Comments
 (0)