Skip to content

Commit 1f15cc8

Browse files
committed
Merge branch 'develop'
# Conflicts: # README.md
2 parents c71d4df + 9ca1955 commit 1f15cc8

File tree

215 files changed

+5303
-3525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+5303
-3525
lines changed

.gitignore

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,49 @@
1-
*.class
2-
test-output
3-
4-
# Mobile Tools for Java (J2ME)
5-
.mtj.tmp/
6-
7-
# Package Files #
8-
*.jar
9-
*.war
10-
*.ear
11-
12-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
13-
hs_err_pid*
14-
15-
target
16-
bin
17-
.project
18-
.classpath
19-
.settings
20-
21-
sw-pom.xml
22-
*.iml
23-
test-config.xml
24-
.idea
25-
/.gradle/
26-
/gradle/
27-
*.bat
28-
/gradlew
1+
*.class
2+
test-output
3+
4+
# Mobile Tools for Java (J2ME)
5+
.mtj.tmp/
6+
7+
# Package Files #
8+
*.jar
9+
*.war
10+
*.ear
11+
12+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
13+
hs_err_pid*
14+
15+
target
16+
bin
17+
.project
18+
.classpath
19+
.settings
20+
21+
sw-pom.xml
22+
*.iml
23+
test-config.xml
24+
.idea
25+
/.gradle/
26+
/gradle/
27+
*.bat
28+
/gradlew
29+
30+
# OSX
31+
# Icon must end with two \r
32+
Icon
33+
34+
35+
._*
36+
.DS_Store
37+
.AppleDouble
38+
.LSOverride
39+
.DocumentRevisions-V100
40+
.fseventsd
41+
.Spotlight-V100
42+
.TemporaryItems
43+
.Trashes
44+
.VolumeIcon.icns
45+
.AppleDB
46+
.AppleDesktop
47+
Network Trash Folder
48+
Temporary Items
49+
.apdisk

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
1. ***本项目Fork自chanjarster/weixin-java-tools,但由于原项目已停止维护,故单独维护和发布,且发布到maven上的groupId也会不同,详细信息见下文。***
77
1. ***自2.0.0版本以来,公众号的接口调整比较大,主要是为了解决主接口类过于庞大不方便管理的问题,将接口实现代码按模块进行拆分。***
88
1. 本SDK要求的最低JDK版本是7,为满足少量还在使用JDK6的用户的需求,特意抽出独立的代码分支项目,请参考 https://github.com/binarywang/weixin-java-tools-for-jdk6 ,其他更早的JDK版本则需要自己改造实现;
9-
1. 最新更新:2016-09-30 发布2.2.0正式版!
9+
1. 最新更新:2016-10-31 发布2.3.0正式版!
1010

1111
===========
1212

@@ -36,12 +36,12 @@ maven:
3636
<dependency>
3737
<groupId>com.github.binarywang</groupId>
3838
<artifactId>weixin-java-mp</artifactId>
39-
<version>2.2.0</version>
39+
<version>2.3.0</version>
4040
</dependency>
4141
```
4242
gradle:
4343
```groovy
44-
compile 'com.github.binarywang:weixin-java-mp:2.2.0'
44+
compile 'com.github.binarywang:weixin-java-mp:2.3.0'
4545
```
4646

4747
* 企业号:
@@ -51,12 +51,12 @@ maven:
5151
<dependency>
5252
<groupId>com.github.binarywang</groupId>
5353
<artifactId>weixin-java-cp</artifactId>
54-
<version>2.2.0</version>
54+
<version>2.3.0</version>
5555
</dependency>
5656
```
5757
gradle:
5858
```groovy
59-
compile 'com.github.binarywang:weixin-java-cp:2.2.0'
59+
compile 'com.github.binarywang:weixin-java-cp:2.3.0'
6060
```
6161

6262
===========

build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ allprojects {
22
apply plugin: 'maven'
33

44
group = 'com.github.binarywang'
5-
version = '2.2.0'
5+
version = '2.3.0'
66
}
77

88
subprojects {
@@ -20,12 +20,9 @@ subprojects {
2020

2121
dependencies {
2222
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.10'
23-
compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version:'4.5'
2423
compile group: 'org.apache.httpcomponents', name: 'httpmime', version:'4.5'
25-
compile group: 'org.jodd', name: 'jodd-http', version:'3.6.7'
2624
compile group: 'com.google.code.gson', name: 'gson', version:'2.7'
2725
compile group: 'com.google.guava', name: 'guava', version:'19.0'
28-
compile group: 'org.jooq', name: 'joor', version:'0.9.6'
2926
compile group: 'commons-codec', name: 'commons-codec', version:'1.10'
3027
compile group: 'commons-io', name: 'commons-io', version:'2.5'
3128
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.4'

pom.xml

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.github.binarywang</groupId>
77
<artifactId>weixin-java-parent</artifactId>
8-
<version>2.2.0</version>
8+
<version>2.3.0</version>
99
<packaging>pom</packaging>
1010
<name>WeiXin Java Tools - Parent</name>
1111
<description>微信公众号、企业号上级POM</description>
12-
<url>https://github.com/binarywang/weixin-java-tools</url>
12+
<url>https://github.com/wechat-group/weixin-java-tools</url>
1313

1414
<licenses>
1515
<license>
@@ -22,23 +22,51 @@
2222
<developer>
2323
<name>Daniel Qian</name>
2424
<email>chanjarster@gmail.com</email>
25+
<url>https://github.com/chanjarster</url>
2526
</developer>
2627
<developer>
2728
<name>Binary Wang</name>
2829
<email>binarywang@gmail.com</email>
30+
<url>https://github.com/binarywang</url>
31+
</developer>
32+
<developer>
33+
<name>gaigeshen</name>
34+
<email>gaigeshen@qq.com</email>
35+
<url>https://github.com/gaigeshen</url>
36+
</developer>
37+
<developer>
38+
<name>Liu Mingbo</name>
39+
<email>liumingbo2008@gmail.com</email>
40+
<url>https://github.com/FirenzesEagle</url>
41+
</developer>
42+
<developer>
43+
<name>kakotor</name>
44+
<email>kakotor@gmail.com</email>
45+
<url>https://github.com/kakotor</url>
46+
</developer>
47+
<developer>
48+
<name>xiong</name>
49+
<email>zhaoxiong.tan@gmail.com</email>
50+
<url>https://github.com/ZhaoxiongTan</url>
51+
</developer>
52+
<developer>
53+
<name>LiuJunGuang</name>
54+
<email>aimilin@yeah.net</email>
55+
<url>https://github.com/aimilin6688</url>
2956
</developer>
3057
</developers>
3158

3259
<scm>
33-
<connection>scm:git:https://github.com/binarywang/weixin-java-tools.git</connection>
34-
<developerConnection>scm:git:git@github.com:binarywang/weixin-java-tools.git</developerConnection>
35-
<url>https://github.com/binarywang/weixin-java-tools</url>
60+
<connection>scm:git:https://github.com/wechat-group/weixin-java-tools.git</connection>
61+
<developerConnection>scm:git:git@github.com:wechat-group/weixin-java-tools.git</developerConnection>
62+
<url>https://github.com/wechat-group/weixin-java-tools</url>
3663
</scm>
3764

3865
<modules>
3966
<module>weixin-java-common</module>
4067
<module>weixin-java-cp</module>
4168
<module>weixin-java-mp</module>
69+
<module>weixin-java-osgi</module>
4270
</modules>
4371

4472
<properties>
@@ -48,16 +76,13 @@
4876
<httpclient.version>4.5</httpclient.version>
4977
<slf4j.version>1.7.10</slf4j.version>
5078
<logback.version>1.1.2</logback.version>
51-
<jodd-http.version>3.6.7</jodd-http.version>
5279
<jedis.version>2.9.0</jedis.version>
5380
<gson.version>2.7</gson.version>
5481
<guava.version>19.0</guava.version>
55-
<joor.version>0.9.6</joor.version>
56-
<commons-lang3.version>3.4</commons-lang3.version>
82+
<commons-lang3.version>3.5</commons-lang3.version>
5783
<commons-io.version>2.5</commons-io.version>
5884
<commons-codec.version>1.10</commons-codec.version>
59-
<jetty.version>9.3.0.M0</jetty.version>
60-
<jetty-new.version>9.3.10.v20160621</jetty-new.version>
85+
<jetty.version>9.3.0.RC0</jetty.version>
6186
</properties>
6287

6388
<dependencies>
@@ -72,21 +97,11 @@
7297
<version>${logback.version}</version>
7398
<scope>test</scope>
7499
</dependency>
75-
<dependency>
76-
<groupId>org.apache.httpcomponents</groupId>
77-
<artifactId>fluent-hc</artifactId>
78-
<version>${httpclient.version}</version>
79-
</dependency>
80100
<dependency>
81101
<groupId>org.apache.httpcomponents</groupId>
82102
<artifactId>httpmime</artifactId>
83103
<version>${httpclient.version}</version>
84104
</dependency>
85-
<dependency>
86-
<groupId>org.jodd</groupId>
87-
<artifactId>jodd-http</artifactId>
88-
<version>${jodd-http.version}</version>
89-
</dependency>
90105
<dependency>
91106
<groupId>com.google.code.gson</groupId>
92107
<artifactId>gson</artifactId>
@@ -111,16 +126,12 @@
111126
<groupId>redis.clients</groupId>
112127
<artifactId>jedis</artifactId>
113128
<version>${jedis.version}</version>
114-
<scope>provided</scope>
129+
<optional>true</optional>
115130
</dependency>
116131
<dependency>
117132
<groupId>com.google.guava</groupId>
118133
<artifactId>guava</artifactId>
119134
</dependency>
120-
<dependency>
121-
<groupId>org.jooq</groupId>
122-
<artifactId>joor</artifactId>
123-
</dependency>
124135
</dependencies>
125136

126137
<dependencyManagement>
@@ -166,11 +177,6 @@
166177
<artifactId>guava</artifactId>
167178
<version>${guava.version}</version>
168179
</dependency>
169-
<dependency>
170-
<groupId>org.jooq</groupId>
171-
<artifactId>joor</artifactId>
172-
<version>${joor.version}</version>
173-
</dependency>
174180
</dependencies>
175181
</dependencyManagement>
176182

@@ -300,5 +306,4 @@
300306
</plugins>
301307
</build>
302308

303-
304309
</project>

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.2.0</version>
9+
<version>2.3.0</version>
1010
</parent>
1111

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

weixin-java-common/src/main/java/me/chanjar/weixin/common/api/WxConsts.java

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ public class WxConsts {
2323
///////////////////////
2424
// 主动发送消息(即客服消息)的消息类型
2525
///////////////////////
26-
public static final String CUSTOM_MSG_TEXT = "text";
27-
public static final String CUSTOM_MSG_IMAGE = "image";
28-
public static final String CUSTOM_MSG_VOICE = "voice";
29-
public static final String CUSTOM_MSG_VIDEO = "video";
30-
public static final String CUSTOM_MSG_MUSIC = "music";
31-
public static final String CUSTOM_MSG_NEWS = "news";
32-
public static final String CUSTOM_MSG_FILE = "file";
33-
public static final String CUSTOM_MSG_WXCARD = "wxcard";
26+
public static final String CUSTOM_MSG_TEXT = "text";//文本消息
27+
public static final String CUSTOM_MSG_IMAGE = "image";//图片消息
28+
public static final String CUSTOM_MSG_VOICE = "voice";//语音消息
29+
public static final String CUSTOM_MSG_VIDEO = "video";//视频消息
30+
public static final String CUSTOM_MSG_MUSIC = "music";//音乐消息
31+
public static final String CUSTOM_MSG_NEWS = "news";//图文消息(点击跳转到外链)
32+
public static final String CUSTOM_MSG_MPNEWS = "mpnews";//图文消息(点击跳转到图文消息页面)
33+
public static final String CUSTOM_MSG_FILE = "file";//发送文件(CP专用)
34+
public static final String CUSTOM_MSG_WXCARD = "wxcard";//卡券消息
3435
public static final String CUSTOM_MSG_TRANSFER_CUSTOMER_SERVICE = "transfer_customer_service";
3536
public static final String CUSTOM_MSG_SAFE_NO = "0";
3637
public static final String CUSTOM_MSG_SAFE_YES = "1";
@@ -63,6 +64,7 @@ public class WxConsts {
6364
* 群发反馈消息代码所对应的文字描述
6465
*/
6566
public static final Map<String, String> MASS_ST_2_DESC = new HashMap<>();
67+
6668
///////////////////////
6769
// 微信端推送过来的事件类型
6870
///////////////////////
@@ -94,6 +96,31 @@ public class WxConsts {
9496
public static final String EVT_KF_CLOSE_SESSION = "kf_close_session"; // 客服关闭会话
9597
public static final String EVT_KF_SWITCH_SESSION = "kf_switch_session"; // 客服转接会话
9698
public static final String EVT_POI_CHECK_NOTIFY = "poi_check_notify"; //门店审核事件推送
99+
//以下为微信认证事件
100+
/**
101+
* 资质认证成功
102+
*/
103+
public static final String EVT_QUALIFICATION_VERIFY_SUCCESS = "qualification_verify_success";
104+
/**
105+
* 资质认证失败
106+
*/
107+
public static final String EVT_QUALIFICATION_VERIFY_FAIL = "qualification_verify_fail";
108+
/**
109+
* 名称认证成功
110+
*/
111+
public static final String EVT_NAMING_VERIFY_SUCCESS = "naming_verify_success";
112+
/**
113+
* 名称认证失败
114+
*/
115+
public static final String EVT_NAMING_VERIFY_FAIL = "naming_verify_fail";
116+
/**
117+
* 年审通知
118+
*/
119+
public static final String EVT_ANNUAL_RENEW = "annual_renew";
120+
/**
121+
* 认证过期失效通知
122+
*/
123+
public static final String EVT_VERIFY_EXPIRED = "verify_expired";
97124

98125
///////////////////////
99126
// 上传多媒体文件的类型
@@ -167,7 +194,7 @@ public class WxConsts {
167194
* 弹出授权页面,可通过openid拿到昵称、性别、所在地。并且,即使在未关注的情况下,只要用户授权,也能获取其信息
168195
*/
169196
public static final String OAUTH2_SCOPE_USER_INFO = "snsapi_userinfo";
170-
197+
171198
/**
172199
* 网页应用登录授权作用域 snsapi_login
173200
*/

weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/WxCardApiSignature.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package me.chanjar.weixin.common.bean;
22

3-
import org.apache.commons.lang3.builder.ToStringBuilder;
4-
import org.apache.commons.lang3.builder.ToStringStyle;
3+
import me.chanjar.weixin.common.util.ToStringUtils;
54

65
import java.io.Serializable;
76

@@ -35,7 +34,7 @@ public class WxCardApiSignature implements Serializable {
3534

3635
@Override
3736
public String toString() {
38-
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
37+
return ToStringUtils.toSimpleString(this);
3938
}
4039

4140
public String getAppId() {

0 commit comments

Comments
 (0)