Skip to content

Commit 491095f

Browse files
committed
Merge branch 'develop'
2 parents e2659b3 + 07e8ffa commit 491095f

File tree

364 files changed

+14025
-5055
lines changed

Some content is hidden

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

364 files changed

+14025
-5055
lines changed

pom.xml

Lines changed: 91 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<?xml version="1.0"?>
22
<project
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
5+
xmlns="http://maven.apache.org/POM/4.0.0">
56
<modelVersion>4.0.0</modelVersion>
67
<groupId>com.github.binarywang</groupId>
78
<artifactId>weixin-java-parent</artifactId>
8-
<version>2.6.0</version>
9+
<version>2.7.0</version>
910
<packaging>pom</packaging>
1011
<name>WeiXin Java Tools - Parent</name>
1112
<description>微信公众号、企业号上级POM</description>
@@ -74,6 +75,11 @@
7475
<email>aimilin@yeah.net</email>
7576
<url>https://github.com/aimilin6688</url>
7677
</developer>
78+
<developer>
79+
<name>ecoolper</name>
80+
<email>crskyp@gmail.com</email>
81+
<url>https://github.com/crskyp</url>
82+
</developer>
7783
</developers>
7884

7985
<scm>
@@ -87,6 +93,7 @@
8793
<module>weixin-java-cp</module>
8894
<module>weixin-java-mp</module>
8995
<module>weixin-java-pay</module>
96+
<module>weixin-java-miniapp</module>
9097
<!--module>weixin-java-osgi</module-->
9198
</modules>
9299

@@ -98,73 +105,90 @@
98105
<downloadJavadocs>true</downloadJavadocs>
99106
<downloadSources>true</downloadSources>
100107
<httpclient.version>4.5</httpclient.version>
101-
<slf4j.version>1.7.10</slf4j.version>
102-
<logback.version>1.1.2</logback.version>
103-
<gson.version>2.7</gson.version>
104-
<guava.version>19.0</guava.version>
105-
<commons-lang3.version>3.5</commons-lang3.version>
106-
<commons-io.version>2.5</commons-io.version>
107-
<commons-codec.version>1.10</commons-codec.version>
108108
<jetty.version>9.3.0.RC0</jetty.version>
109-
<jedis.version>2.9.0</jedis.version>
110109
</properties>
111110

112-
<dependencies>
113-
<dependency>
114-
<groupId>org.slf4j</groupId>
115-
<artifactId>slf4j-api</artifactId>
116-
<version>${slf4j.version}</version>
117-
</dependency>
118-
<dependency>
119-
<groupId>com.thoughtworks.xstream</groupId>
120-
<artifactId>xstream</artifactId>
121-
<version>1.4.9</version>
122-
</dependency>
123-
<dependency>
124-
<groupId>ch.qos.logback</groupId>
125-
<artifactId>logback-classic</artifactId>
126-
<version>${logback.version}</version>
127-
<scope>test</scope>
128-
</dependency>
129-
<dependency>
130-
<groupId>org.apache.httpcomponents</groupId>
131-
<artifactId>httpclient</artifactId>
132-
<version>${httpclient.version}</version>
133-
</dependency>
134-
<dependency>
135-
<groupId>org.apache.httpcomponents</groupId>
136-
<artifactId>httpmime</artifactId>
137-
<version>${httpclient.version}</version>
138-
</dependency>
139-
<dependency>
140-
<groupId>com.google.code.gson</groupId>
141-
<artifactId>gson</artifactId>
142-
<version>${gson.version}</version>
143-
</dependency>
144-
<dependency>
145-
<groupId>commons-codec</groupId>
146-
<artifactId>commons-codec</artifactId>
147-
<version>${commons-codec.version}</version>
148-
</dependency>
149-
<dependency>
150-
<groupId>commons-io</groupId>
151-
<artifactId>commons-io</artifactId>
152-
<version>${commons-io.version}</version>
153-
</dependency>
154-
<dependency>
155-
<groupId>org.apache.commons</groupId>
156-
<artifactId>commons-lang3</artifactId>
157-
<version>${commons-lang3.version}</version>
158-
</dependency>
159-
<dependency>
160-
<groupId>com.google.guava</groupId>
161-
<artifactId>guava</artifactId>
162-
<version>${guava.version}</version>
163-
</dependency>
164-
</dependencies>
165-
166111
<dependencyManagement>
167112
<dependencies>
113+
<dependency>
114+
<groupId>com.github.binarywang</groupId>
115+
<artifactId>qrcode-utils</artifactId>
116+
<version>1.1</version>
117+
</dependency>
118+
<!-- 由于jodd-http较新的3.8版本需要jdk8,故而此处采用较低版本 -->
119+
<dependency>
120+
<groupId>org.jodd</groupId>
121+
<artifactId>jodd-http</artifactId>
122+
<version>3.7.1</version>
123+
<scope>provided</scope>
124+
</dependency>
125+
<dependency>
126+
<groupId>com.squareup.okhttp3</groupId>
127+
<artifactId>okhttp</artifactId>
128+
<version>3.7.0</version>
129+
<scope>provided</scope>
130+
</dependency>
131+
132+
<dependency>
133+
<groupId>org.apache.httpcomponents</groupId>
134+
<artifactId>httpclient</artifactId>
135+
<version>${httpclient.version}</version>
136+
</dependency>
137+
<dependency>
138+
<groupId>org.apache.httpcomponents</groupId>
139+
<artifactId>httpmime</artifactId>
140+
<version>${httpclient.version}</version>
141+
</dependency>
142+
<dependency>
143+
<groupId>commons-codec</groupId>
144+
<artifactId>commons-codec</artifactId>
145+
<version>1.10</version>
146+
</dependency>
147+
<dependency>
148+
<groupId>commons-io</groupId>
149+
<artifactId>commons-io</artifactId>
150+
<version>2.5</version>
151+
</dependency>
152+
<dependency>
153+
<groupId>org.apache.commons</groupId>
154+
<artifactId>commons-lang3</artifactId>
155+
<version>3.5</version>
156+
</dependency>
157+
<dependency>
158+
<groupId>org.slf4j</groupId>
159+
<artifactId>slf4j-api</artifactId>
160+
<version>1.7.24</version>
161+
</dependency>
162+
<dependency>
163+
<groupId>com.thoughtworks.xstream</groupId>
164+
<artifactId>xstream</artifactId>
165+
<version>1.4.9</version>
166+
</dependency>
167+
<!-- 由于guava较新的21.0版本需要jdk8,故而此处采用较低版本 -->
168+
<dependency>
169+
<groupId>com.google.guava</groupId>
170+
<artifactId>guava</artifactId>
171+
<version>20.0</version>
172+
</dependency>
173+
<dependency>
174+
<groupId>com.google.code.gson</groupId>
175+
<artifactId>gson</artifactId>
176+
<version>2.8.0</version>
177+
</dependency>
178+
179+
<!-- 测试所用依赖 -->
180+
<dependency>
181+
<groupId>joda-time</groupId>
182+
<artifactId>joda-time</artifactId>
183+
<version>2.9.7</version>
184+
<scope>test</scope>
185+
</dependency>
186+
<dependency>
187+
<groupId>ch.qos.logback</groupId>
188+
<artifactId>logback-classic</artifactId>
189+
<version>1.1.11</version>
190+
<scope>test</scope>
191+
</dependency>
168192
<dependency>
169193
<groupId>com.google.inject</groupId>
170194
<artifactId>guice</artifactId>
@@ -174,7 +198,7 @@
174198
<dependency>
175199
<groupId>org.testng</groupId>
176200
<artifactId>testng</artifactId>
177-
<version>6.8.7</version>
201+
<version>6.10</version>
178202
<scope>test</scope>
179203
</dependency>
180204
<dependency>
@@ -198,7 +222,8 @@
198222
<dependency>
199223
<groupId>redis.clients</groupId>
200224
<artifactId>jedis</artifactId>
201-
<version>${jedis.version}</version>
225+
<version>2.9.0</version>
226+
<scope>provided</scope>
202227
</dependency>
203228
</dependencies>
204229
</dependencyManagement>

weixin-java-common/build.gradle

Lines changed: 0 additions & 12 deletions
This file was deleted.

weixin-java-common/pom.xml

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,73 @@
11
<?xml version="1.0"?>
22
<project
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4-
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
5+
xmlns="http://maven.apache.org/POM/4.0.0">
56
<modelVersion>4.0.0</modelVersion>
67
<parent>
78
<groupId>com.github.binarywang</groupId>
89
<artifactId>weixin-java-parent</artifactId>
9-
<version>2.6.0</version>
10+
<version>2.7.0</version>
1011
</parent>
1112

1213
<artifactId>weixin-java-common</artifactId>
1314
<name>WeiXin Java Tools - Common</name>
1415
<description>微信公众号、企业号Java SDK Common</description>
1516

1617
<dependencies>
18+
<dependency>
19+
<groupId>org.jodd</groupId>
20+
<artifactId>jodd-http</artifactId>
21+
<scope>provided</scope>
22+
</dependency>
23+
<dependency>
24+
<groupId>com.squareup.okhttp3</groupId>
25+
<artifactId>okhttp</artifactId>
26+
<scope>provided</scope>
27+
</dependency>
28+
29+
<dependency>
30+
<groupId>org.slf4j</groupId>
31+
<artifactId>slf4j-api</artifactId>
32+
</dependency>
33+
<dependency>
34+
<groupId>com.thoughtworks.xstream</groupId>
35+
<artifactId>xstream</artifactId>
36+
</dependency>
37+
<dependency>
38+
<groupId>org.apache.httpcomponents</groupId>
39+
<artifactId>httpclient</artifactId>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.apache.httpcomponents</groupId>
43+
<artifactId>httpmime</artifactId>
44+
</dependency>
45+
<dependency>
46+
<groupId>com.google.code.gson</groupId>
47+
<artifactId>gson</artifactId>
48+
</dependency>
49+
<dependency>
50+
<groupId>commons-codec</groupId>
51+
<artifactId>commons-codec</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>commons-io</groupId>
55+
<artifactId>commons-io</artifactId>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.apache.commons</groupId>
59+
<artifactId>commons-lang3</artifactId>
60+
</dependency>
61+
<dependency>
62+
<groupId>com.google.guava</groupId>
63+
<artifactId>guava</artifactId>
64+
</dependency>
65+
66+
<dependency>
67+
<groupId>ch.qos.logback</groupId>
68+
<artifactId>logback-classic</artifactId>
69+
<scope>test</scope>
70+
</dependency>
1771
<dependency>
1872
<groupId>org.testng</groupId>
1973
<artifactId>testng</artifactId>

weixin-java-common/src/main/java/me/chanjar/weixin/common/annotation/Required.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
/**
99
* 标识某个字段是否是必填的
10-
*
10+
* <p>
1111
* Created by Binary Wang on 2016/9/25.
12-
* @author binarywang (https://github.com/binarywang)
1312
*
13+
* @author binarywang (https://github.com/binarywang)
1414
*/
1515
@Retention(RetentionPolicy.RUNTIME)
1616
@Target(ElementType.FIELD)
1717
public @interface Required {
1818

19-
}
19+
}

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

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public class WxConsts {
2424
public static final String XML_MSG_HARDWARE = "hardware";
2525
public static final String XML_TRANSFER_CUSTOMER_SERVICE = "transfer_customer_service";
2626

27-
2827
///////////////////////
2928
// 主动发送消息(即客服消息)的消息类型
3029
///////////////////////
@@ -88,45 +87,6 @@ public class WxConsts {
8887
public static final String EVT_LOCATION_SELECT = "location_select";
8988
public static final String EVT_TEMPLATESENDJOBFINISH = "TEMPLATESENDJOBFINISH";
9089
public static final String EVT_ENTER_AGENT = "enter_agent";
91-
public static final String EVT_CARD_PASS_CHECK = "card_pass_check";
92-
public static final String EVT_CARD_NOT_PASS_CHECK = "card_not_pass_check";
93-
public static final String EVT_USER_GET_CARD = "user_get_card";
94-
public static final String EVT_USER_DEL_CARD = "user_del_card";
95-
public static final String EVT_USER_CONSUME_CARD = "user_consume_card";
96-
public static final String EVT_USER_PAY_FROM_PAY_CELL = "user_pay_from_pay_cell";
97-
public static final String EVT_USER_VIEW_CARD = "user_view_card";
98-
public static final String EVT_USER_ENTER_SESSION_FROM_CARD = "user_enter_session_from_card";
99-
public static final String EVT_CARD_SKU_REMIND = "card_sku_remind"; // 库存报警
100-
public static final String EVT_KF_CREATE_SESSION = "kf_create_session"; // 客服接入会话
101-
public static final String EVT_KF_CLOSE_SESSION = "kf_close_session"; // 客服关闭会话
102-
public static final String EVT_KF_SWITCH_SESSION = "kf_switch_session"; // 客服转接会话
103-
public static final String EVT_POI_CHECK_NOTIFY = "poi_check_notify"; //门店审核事件推送
104-
public static final String EVN_SUBMIT_MEMBERCARD_USER_INFO = "submit_membercard_user_info"; //接收会员信息事件推送
105-
//以下为微信认证事件
106-
/**
107-
* 资质认证成功
108-
*/
109-
public static final String EVT_QUALIFICATION_VERIFY_SUCCESS = "qualification_verify_success";
110-
/**
111-
* 资质认证失败
112-
*/
113-
public static final String EVT_QUALIFICATION_VERIFY_FAIL = "qualification_verify_fail";
114-
/**
115-
* 名称认证成功
116-
*/
117-
public static final String EVT_NAMING_VERIFY_SUCCESS = "naming_verify_success";
118-
/**
119-
* 名称认证失败
120-
*/
121-
public static final String EVT_NAMING_VERIFY_FAIL = "naming_verify_fail";
122-
/**
123-
* 年审通知
124-
*/
125-
public static final String EVT_ANNUAL_RENEW = "annual_renew";
126-
/**
127-
* 认证过期失效通知
128-
*/
129-
public static final String EVT_VERIFY_EXPIRED = "verify_expired";
13090

13191
///////////////////////
13292
// 上传多媒体文件的类型
@@ -185,7 +145,7 @@ public class WxConsts {
185145
* 跳转图文消息URL
186146
*/
187147
public static final String BUTTON_VIEW_LIMITED = "view_limited";
188-
148+
189149
/**
190150
* 不弹出授权页面,直接跳转,只能获取用户openid
191151
*/

weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/result/WxMediaUploadResult.java

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

33
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
4+
import org.apache.commons.lang3.builder.ToStringBuilder;
5+
import org.apache.commons.lang3.builder.ToStringStyle;
46

57
import java.io.Serializable;
68

@@ -50,8 +52,7 @@ public void setThumbMediaId(String thumbMediaId) {
5052

5153
@Override
5254
public String toString() {
53-
return "WxUploadResult [type=" + this.type + ", media_id=" + this.mediaId + ", thumb_media_id=" + this.thumbMediaId
54-
+ ", created_at=" + this.createdAt + "]";
55+
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
5556
}
5657

5758
}

0 commit comments

Comments
 (0)