Skip to content

Commit 8b1f026

Browse files
committed
修复一些warning
1 parent a21f152 commit 8b1f026

4 files changed

Lines changed: 35 additions & 30 deletions

File tree

‎weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/WxMpCustomMessage.java‎

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
*
1414
*/
1515
public class WxMpCustomMessage implements Serializable {
16-
16+
private static final long serialVersionUID = -9196732086954365246L;
17+
1718
private String toUser;
1819
private String msgType;
1920
private String content;
@@ -23,16 +24,16 @@ public class WxMpCustomMessage implements Serializable {
2324
private String description;
2425
private String musicUrl;
2526
private String hqMusicUrl;
26-
private List<WxArticle> articles = new ArrayList<WxArticle>();
27+
private List<WxArticle> articles = new ArrayList<>();
2728

2829
public String getToUser() {
29-
return toUser;
30+
return this.toUser;
3031
}
3132
public void setToUser(String toUser) {
3233
this.toUser = toUser;
3334
}
3435
public String getMsgType() {
35-
return msgType;
36+
return this.msgType;
3637
}
3738

3839
/**
@@ -51,49 +52,49 @@ public void setMsgType(String msgType) {
5152
this.msgType = msgType;
5253
}
5354
public String getContent() {
54-
return content;
55+
return this.content;
5556
}
5657
public void setContent(String content) {
5758
this.content = content;
5859
}
5960
public String getMediaId() {
60-
return mediaId;
61+
return this.mediaId;
6162
}
6263
public void setMediaId(String mediaId) {
6364
this.mediaId = mediaId;
6465
}
6566
public String getThumbMediaId() {
66-
return thumbMediaId;
67+
return this.thumbMediaId;
6768
}
6869
public void setThumbMediaId(String thumbMediaId) {
6970
this.thumbMediaId = thumbMediaId;
7071
}
7172
public String getTitle() {
72-
return title;
73+
return this.title;
7374
}
7475
public void setTitle(String title) {
7576
this.title = title;
7677
}
7778
public String getDescription() {
78-
return description;
79+
return this.description;
7980
}
8081
public void setDescription(String description) {
8182
this.description = description;
8283
}
8384
public String getMusicUrl() {
84-
return musicUrl;
85+
return this.musicUrl;
8586
}
8687
public void setMusicUrl(String musicUrl) {
8788
this.musicUrl = musicUrl;
8889
}
8990
public String getHqMusicUrl() {
90-
return hqMusicUrl;
91+
return this.hqMusicUrl;
9192
}
9293
public void setHqMusicUrl(String hqMusicUrl) {
9394
this.hqMusicUrl = hqMusicUrl;
9495
}
9596
public List<WxArticle> getArticles() {
96-
return articles;
97+
return this.articles;
9798
}
9899
public void setArticles(List<WxArticle> articles) {
99100
this.articles = articles;
@@ -111,25 +112,25 @@ public static class WxArticle {
111112
private String picUrl;
112113

113114
public String getTitle() {
114-
return title;
115+
return this.title;
115116
}
116117
public void setTitle(String title) {
117118
this.title = title;
118119
}
119120
public String getDescription() {
120-
return description;
121+
return this.description;
121122
}
122123
public void setDescription(String description) {
123124
this.description = description;
124125
}
125126
public String getUrl() {
126-
return url;
127+
return this.url;
127128
}
128129
public void setUrl(String url) {
129130
this.url = url;
130131
}
131132
public String getPicUrl() {
132-
return picUrl;
133+
return this.picUrl;
133134
}
134135
public void setPicUrl(String picUrl) {
135136
this.picUrl = picUrl;

‎weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/WxMpXmlOutMessage.java‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@XStreamAlias("xml")
1414
public abstract class WxMpXmlOutMessage implements Serializable {
1515

16+
private static final long serialVersionUID = -381382011286216263L;
17+
1618
@XStreamAlias("ToUserName")
1719
@XStreamConverter(value=XStreamCDataConverter.class)
1820
protected String toUserName;
@@ -29,39 +31,39 @@ public abstract class WxMpXmlOutMessage implements Serializable {
2931
protected String msgType;
3032

3133
public String getToUserName() {
32-
return toUserName;
34+
return this.toUserName;
3335
}
3436

3537
public void setToUserName(String toUserName) {
3638
this.toUserName = toUserName;
3739
}
3840

3941
public String getFromUserName() {
40-
return fromUserName;
42+
return this.fromUserName;
4143
}
4244

4345
public void setFromUserName(String fromUserName) {
4446
this.fromUserName = fromUserName;
4547
}
4648

4749
public Long getCreateTime() {
48-
return createTime;
50+
return this.createTime;
4951
}
5052

5153
public void setCreateTime(Long createTime) {
5254
this.createTime = createTime;
5355
}
5456

5557
public String getMsgType() {
56-
return msgType;
58+
return this.msgType;
5759
}
5860

5961
public void setMsgType(String msgType) {
6062
this.msgType = msgType;
6163
}
6264

6365
public String toXml() {
64-
return XStreamTransformer.toXml((Class) this.getClass(), this);
66+
return XStreamTransformer.toXml((Class<WxMpXmlOutMessage>) this.getClass(), this);
6567
}
6668

6769
/**
@@ -121,9 +123,9 @@ public static MusicBuilder MUSIC() {
121123
public static NewsBuilder NEWS() {
122124
return new NewsBuilder();
123125
}
124-
/**
126+
127+
/**
125128
* 获得客服消息builder
126-
*
127129
* @return
128130
*/
129131
public static TransferCustomerServiceBuilder TRANSFER_CUSTOMER_SERVICE() {

‎weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/WxMpXmlOutTransferCustomerServiceMessage.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
@XStreamAlias("xml")
99
public class WxMpXmlOutTransferCustomerServiceMessage extends WxMpXmlOutMessage {
10+
private static final long serialVersionUID = 1850903037285841322L;
11+
1012
@XStreamAlias("TransInfo")
1113
protected TransInfo transInfo;
1214

@@ -15,7 +17,7 @@ public WxMpXmlOutTransferCustomerServiceMessage() {
1517
}
1618

1719
public TransInfo getTransInfo() {
18-
return transInfo;
20+
return this.transInfo;
1921
}
2022

2123
public void setTransInfo(TransInfo transInfo) {
@@ -30,7 +32,7 @@ public static class TransInfo {
3032
private String kfAccount;
3133

3234
public String getKfAccount() {
33-
return kfAccount;
35+
return this.kfAccount;
3436
}
3537

3638
public void setKfAccount(String kfAccount) {

‎weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/outxmlbuilder/TransferCustomerServiceBuilder.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
public final class TransferCustomerServiceBuilder extends BaseBuilder<TransferCustomerServiceBuilder, WxMpXmlOutTransferCustomerServiceMessage> {
1515
private String kfAccount;
1616

17-
public TransferCustomerServiceBuilder kfAccount(String kfAccount) {
18-
this.kfAccount = kfAccount;
17+
public TransferCustomerServiceBuilder kfAccount(String kf) {
18+
this.kfAccount = kf;
1919
return this;
2020
}
2121

22-
22+
@Override
2323
public WxMpXmlOutTransferCustomerServiceMessage build() {
2424
WxMpXmlOutTransferCustomerServiceMessage m = new WxMpXmlOutTransferCustomerServiceMessage();
2525
setCommon(m);
26-
if(StringUtils.isNotBlank(kfAccount)){
26+
if(StringUtils.isNotBlank(this.kfAccount)){
2727
WxMpXmlOutTransferCustomerServiceMessage.TransInfo transInfo = new WxMpXmlOutTransferCustomerServiceMessage.TransInfo();
28-
transInfo.setKfAccount(kfAccount);
28+
transInfo.setKfAccount(this.kfAccount);
2929
m.setTransInfo(transInfo);
3030
}
3131
return m;

0 commit comments

Comments
 (0)