Skip to content

Commit ddd4079

Browse files
authored
Merge pull request #11 from Wechat-Group/develop
合并
2 parents 02679bb + 9246243 commit ddd4079

30 files changed

+169
-206
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ Icon
4848
Network Trash Folder
4949
Temporary Items
5050
.apdisk
51+
/.sonar/
52+
sonar-project.properties

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Weixin Java Tools 微信公众号/企业号开发Java SDK
2626

2727
## 版本说明
2828
1. 本项目定为每两个月发布一次正式版,版本号格式为X.X.0(如2.1.0,2.2.0等),月底发布新版本,遇到重大问题需修复会及时提交新版本,欢迎大家随时提交Pull Request;
29-
1. BUG修复和新特性一般会先发布成小版本作为临时版本(如2.0.1,2.0.2等,即尾号不为0,以区别于正式版);
29+
1. BUG修复和新特性一般会先发布成小版本作为临时测试版本(如2.0.1-beta,2.0.2-beta等,即尾号不为0,并添加beta字样,以区别于正式版);
3030
1. 目前最新版本号为 [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.binarywang/weixin-java-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.binarywang/weixin-java-parent) ,也可以通过访问链接 [【公众号】](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.binarywang%22%20AND%20a%3A%22weixin-java-mp%22)[【企业号】](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.binarywang%22%20AND%20a%3A%22weixin-java-cp%22)
3131
分别查看所有最新的版本。
3232

pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.github.binarywang</groupId>
77
<artifactId>weixin-java-parent</artifactId>
8-
<version>2.5.0-SNAPSHOT</version>
8+
<version>2.4.4-beta</version>
99
<packaging>pom</packaging>
1010
<name>WeiXin Java Tools - Parent</name>
1111
<description>微信公众号、企业号上级POM</description>
@@ -69,6 +69,11 @@
6969
<email>[email protected]</email>
7070
<url>https://github.com/johnnytung</url>
7171
</developer>
72+
<developer>
73+
<name>Jonk</name>
74+
<email>[email protected]</email>
75+
<url>https://github.com/aimilin6688</url>
76+
</developer>
7277
</developers>
7378

7479
<scm>

weixin-java-common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.github.binarywang</groupId>
88
<artifactId>weixin-java-parent</artifactId>
9-
<version>2.5.0-SNAPSHOT</version>
9+
<version>2.4.4-beta</version>
1010
</parent>
1111

1212
<artifactId>weixin-java-common</artifactId>

weixin-java-cp/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.github.binarywang</groupId>
88
<artifactId>weixin-java-parent</artifactId>
9-
<version>2.5.0-SNAPSHOT</version>
9+
<version>2.4.4-beta</version>
1010
</parent>
1111

1212
<artifactId>weixin-java-cp</artifactId>

weixin-java-mp/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.github.binarywang</groupId>
88
<artifactId>weixin-java-parent</artifactId>
9-
<version>2.5.0-SNAPSHOT</version>
9+
<version>2.4.4-beta</version>
1010
</parent>
1111
<artifactId>weixin-java-mp</artifactId>
1212
<name>WeiXin Java Tools - MP</name>

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,7 @@ protected synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor,
422422
}
423423

424424
if (error.getErrorCode() != 0) {
425-
this.log.error("\n[URL]: {}\n[PARAMS]: {}\n[RESPONSE]: {}", uri, data,
426-
error);
425+
this.log.error("\n[URL]: {}\n[PARAMS]: {}\n[RESPONSE]: {}", uri, data, error);
427426
throw new WxErrorException(error);
428427
}
429428
return null;

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/WxMpMassOpenIdsMessage.java

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
package me.chanjar.weixin.mp.bean;
22

3+
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
4+
35
import java.io.Serializable;
46
import java.util.ArrayList;
57
import java.util.List;
68

7-
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
8-
99
/**
1010
* openid列表群发的消息
11-
*
11+
*
1212
* @author chanjarster
1313
*/
1414
public class WxMpMassOpenIdsMessage implements Serializable {
1515
private static final long serialVersionUID = -8022910911104788999L;
16-
16+
1717
private List<String> toUsers = new ArrayList<>();
1818
private String msgType;
1919
private String content;
2020
private String mediaId;
21+
private boolean sendIgnoreReprint = false;
2122

2223
public WxMpMassOpenIdsMessage() {
2324
super();
2425
}
25-
26+
2627
public String getMsgType() {
2728
return this.msgType;
2829
}
@@ -86,4 +87,15 @@ public void setToUsers(List<String> toUsers) {
8687
this.toUsers = toUsers;
8788
}
8889

90+
public boolean isSendIgnoreReprint() {
91+
return sendIgnoreReprint;
92+
}
93+
94+
/**
95+
*
96+
* @param sendIgnoreReprint 文章被判定为转载时,是否继续进行群发操作。
97+
*/
98+
public void setSendIgnoreReprint(boolean sendIgnoreReprint) {
99+
this.sendIgnoreReprint = sendIgnoreReprint;
100+
}
89101
}

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/WxMpMassTagMessage.java

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

3-
import java.io.Serializable;
4-
53
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
64

5+
import java.io.Serializable;
6+
77
/**
88
* 按标签群发的消息
9-
*
9+
*
1010
* @author chanjarster
1111
*/
1212
public class WxMpMassTagMessage implements Serializable {
13-
13+
1414
private static final long serialVersionUID = -6625914040986749286L;
1515
private Long tagId;
16-
private String msgtype;
16+
private String msgType;
1717
private String content;
1818
private String mediaId;
19+
private boolean sendIgnoreReprint = false;
1920

2021
public WxMpMassTagMessage() {
2122
super();
2223
}
23-
24-
public String getMsgtype() {
25-
return this.msgtype;
24+
25+
public String getMsgType() {
26+
return this.msgType;
2627
}
2728

2829
/**
@@ -35,10 +36,11 @@ public String getMsgtype() {
3536
* {@link me.chanjar.weixin.common.api.WxConsts#MASS_MSG_VOICE}
3637
* 如果msgtype和media_id不匹配的话,会返回系统繁忙的错误
3738
* </pre>
38-
* @param msgtype
39+
*
40+
* @param msgType 消息类型
3941
*/
40-
public void setMsgtype(String msgtype) {
41-
this.msgtype = msgtype;
42+
public void setMsgType(String msgType) {
43+
this.msgType = msgType;
4244
}
4345

4446
public String getContent() {
@@ -67,10 +69,23 @@ public Long getTagId() {
6769

6870
/**
6971
* 如果不设置则就意味着发给所有用户
70-
* @param tagId
72+
*
73+
* @param tagId 标签id
7174
*/
7275
public void setTagId(Long tagId) {
7376
this.tagId = tagId;
7477
}
7578

79+
public boolean isSendIgnoreReprint() {
80+
return sendIgnoreReprint;
81+
}
82+
83+
/**
84+
*
85+
* @param sendIgnoreReprint 文章被判定为转载时,是否继续进行群发操作。
86+
*/
87+
public void setSendIgnoreReprint(boolean sendIgnoreReprint) {
88+
this.sendIgnoreReprint = sendIgnoreReprint;
89+
}
90+
7691
}

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/result/WxMpMassSendResult.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
package me.chanjar.weixin.mp.bean.result;
22

3+
import me.chanjar.weixin.common.util.ToStringUtils;
34
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
45

56
import java.io.Serializable;
67

78
/**
89
* <pre>
910
* 群发消息一发送就返回的结果
10-
*
11+
*
1112
* 真正的群发消息是否发送成功要看
1213
* http://mp.weixin.qq.com/wiki/index.php?title=高级群发接口#.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81.E7.BE.A4.E5.8F.91.E7.BB.93.E6.9E.9C
13-
*
14+
*
1415
* </pre>
1516
* @author chanjarster
1617
*
1718
*/
1819
public class WxMpMassSendResult implements Serializable {
19-
20-
/**
21-
*
22-
*/
2320
private static final long serialVersionUID = -4816336807575562818L;
2421
private String errorCode;
2522
private String errorMsg;
@@ -64,7 +61,7 @@ public static WxMpMassSendResult fromJson(String json) {
6461

6562
@Override
6663
public String toString() {
67-
return "WxMassSendResult [errcode=" + this.errorCode + ", errmsg=" + this.errorMsg + ", msg_id=" + this.msgId + "]";
64+
return ToStringUtils.toSimpleString(this);
6865
}
69-
66+
7067
}

0 commit comments

Comments
 (0)