Skip to content

Commit ad05411

Browse files
committed
Merge branch 'develop'
2 parents 6a8fd45 + 2ec3c52 commit ad05411

File tree

44 files changed

+1974
-277
lines changed

Some content is hidden

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

44 files changed

+1974
-277
lines changed

pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>me.chanjar</groupId>
77
<artifactId>weixin-java-parent</artifactId>
8-
<version>1.3.3</version>
8+
<version>1.3.4-SNAPSHOT</version>
99
<packaging>pom</packaging>
1010
<name>WeiXin Java Tools - Parent</name>
1111
<description>微信公众号、企业号上级POM</description>
@@ -44,6 +44,7 @@
4444
<httpclient.version>4.5</httpclient.version>
4545
<slf4j.version>1.7.10</slf4j.version>
4646
<logback.version>1.1.2</logback.version>
47+
<jodd-http.version>3.6.7</jodd-http.version>
4748
</properties>
4849

4950
<dependencies>
@@ -68,6 +69,11 @@
6869
<artifactId>httpmime</artifactId>
6970
<version>${httpclient.version}</version>
7071
</dependency>
72+
<dependency>
73+
<groupId>org.jodd</groupId>
74+
<artifactId>jodd-http</artifactId>
75+
<version>${jodd-http.version}</version>
76+
</dependency>
7177
<dependency>
7278
<groupId>com.google.code.gson</groupId>
7379
<artifactId>gson</artifactId>

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>me.chanjar</groupId>
88
<artifactId>weixin-java-parent</artifactId>
9-
<version>1.3.3</version>
9+
<version>1.3.4-SNAPSHOT</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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class WxConsts {
4747
///////////////////////
4848
public static final String MASS_ST_SUCCESS = "send success";
4949
public static final String MASS_ST_FAIL = "send fail";
50-
public static final String MASS_ST_涉嫌广告 = "err(10001)";
50+
public static final String MASS_ST_涉嫌广告 = "err(10001)";
5151
public static final String MASS_ST_涉嫌政治 = "err(20001)";
5252
public static final String MASS_ST_涉嫌社会 = "err(20004)";
5353
public static final String MASS_ST_涉嫌色情 = "err(20002)";
@@ -93,6 +93,15 @@ public class WxConsts {
9393
public static final String EVT_LOCATION_SELECT = "location_select";
9494
public static final String EVT_TEMPLATESENDJOBFINISH = "TEMPLATESENDJOBFINISH";
9595
public static final String EVT_ENTER_AGENT = "enter_agent";
96+
public static final String EVT_CARD_PASS_CHECK = "card_pass_check";
97+
public static final String EVT_CARD_NOT_PASS_CHECK = "card_not_pass_check";
98+
public static final String EVT_USER_GET_CARD = "user_get_card";
99+
public static final String EVT_USER_DEL_CARD = "user_del_card";
100+
public static final String EVT_USER_CONSUME_CARD = "user_consume_card";
101+
public static final String EVT_USER_PAY_FROM_PAY_CELL = "user_pay_from_pay_cell";
102+
public static final String EVT_USER_VIEW_CARD = "user_view_card";
103+
public static final String EVT_USER_ENTER_SESSION_FROM_CARD = "user_enter_session_from_card";
104+
public static final String EVT_CARD_SKU_REMIND = "card_sku_remind"; // 库存报警
96105

97106
///////////////////////
98107
// 上传多媒体文件的类型
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
package me.chanjar.weixin.common.bean;
2+
3+
import java.io.Serializable;
4+
5+
/**
6+
* 卡券Api签名
7+
*
8+
* @author YuJian
9+
* @version 15/11/8
10+
*/
11+
public class WxCardApiSignature implements Serializable {
12+
13+
private String appId;
14+
15+
private String cardId;
16+
17+
private String cardType;
18+
19+
private String locationId;
20+
21+
private String code;
22+
23+
private String openId;
24+
25+
private Long timestamp;
26+
27+
private String nonceStr;
28+
29+
private String signature;
30+
31+
public String getAppId() {
32+
return appId;
33+
}
34+
35+
public void setAppId(String appId) {
36+
this.appId = appId;
37+
}
38+
39+
public String getCardId() {
40+
return cardId;
41+
}
42+
43+
public void setCardId(String cardId) {
44+
this.cardId = cardId;
45+
}
46+
47+
public String getCardType() {
48+
return cardType;
49+
}
50+
51+
public void setCardType(String cardType) {
52+
this.cardType = cardType;
53+
}
54+
55+
public String getLocationId() {
56+
return locationId;
57+
}
58+
59+
public void setLocationId(String locationId) {
60+
this.locationId = locationId;
61+
}
62+
63+
public String getCode() {
64+
return code;
65+
}
66+
67+
public void setCode(String code) {
68+
this.code = code;
69+
}
70+
71+
public String getOpenId() {
72+
return openId;
73+
}
74+
75+
public void setOpenId(String openId) {
76+
this.openId = openId;
77+
}
78+
79+
public Long getTimestamp() {
80+
return timestamp;
81+
}
82+
83+
public void setTimestamp(Long timestamp) {
84+
this.timestamp = timestamp;
85+
}
86+
87+
public String getNonceStr() {
88+
return nonceStr;
89+
}
90+
91+
public void setNonceStr(String nonceStr) {
92+
this.nonceStr = nonceStr;
93+
}
94+
95+
public String getSignature() {
96+
return signature;
97+
}
98+
99+
public void setSignature(String signature) {
100+
this.signature = signature;
101+
}
102+
}

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

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

3+
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
4+
import org.apache.commons.codec.Charsets;
5+
36
import java.io.InputStream;
47
import java.io.InputStreamReader;
58
import java.io.Serializable;
69
import java.util.ArrayList;
710
import java.util.List;
811

9-
import org.apache.commons.codec.Charsets;
10-
11-
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
12-
1312
/**
1413
* 企业号菜单
1514
* @author Daniel Qian
@@ -136,6 +135,7 @@ public static class WxMenuRule {
136135
private String province;
137136
private String city;
138137
private String clientPlatformType;
138+
private String language;
139139

140140
public String getGroupId() {
141141
return groupId;
@@ -184,8 +184,16 @@ public String getClientPlatformType() {
184184
public void setClientPlatformType(String clientPlatformType) {
185185
this.clientPlatformType = clientPlatformType;
186186
}
187-
188-
@Override
187+
188+
public String getLanguage() {
189+
return language;
190+
}
191+
192+
public void setLanguage(String language) {
193+
this.language = language;
194+
}
195+
196+
@Override
189197
public String toString() {
190198
return "matchrule:{" +
191199
"group_id='" + groupId + '\'' +
@@ -194,6 +202,7 @@ public String toString() {
194202
", province" + province + '\'' +
195203
", city" + city + '\'' +
196204
", client_platform_type" + clientPlatformType + '\'' +
205+
", language" + language + '\'' +
197206
"}";
198207
}
199208
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package me.chanjar.weixin.common.util.http;
2+
3+
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
4+
import org.apache.http.impl.client.CloseableHttpClient;
5+
6+
/**
7+
* httpclient build interface
8+
*/
9+
public interface ApacheHttpClientBuilder {
10+
11+
/**
12+
* 构建httpclient实例
13+
* @return new instance of CloseableHttpClient
14+
*/
15+
CloseableHttpClient build();
16+
17+
/**
18+
* 代理服务器地址
19+
* @param httpProxyHost
20+
* @return
21+
*/
22+
ApacheHttpClientBuilder httpProxyHost(String httpProxyHost);
23+
24+
/**
25+
* 代理服务器端口
26+
* @param httpProxyPort
27+
* @return
28+
*/
29+
ApacheHttpClientBuilder httpProxyPort(int httpProxyPort);
30+
31+
/**
32+
* 代理服务器用户名
33+
* @param httpProxyUsername
34+
* @return
35+
*/
36+
ApacheHttpClientBuilder httpProxyUsername(String httpProxyUsername);
37+
38+
/**
39+
* 代理服务器密码
40+
* @param httpProxyPassword
41+
* @return
42+
*/
43+
ApacheHttpClientBuilder httpProxyPassword(String httpProxyPassword);
44+
45+
/**
46+
* ssl连接socket工厂
47+
* @param sslConnectionSocketFactory
48+
* @return
49+
*/
50+
ApacheHttpClientBuilder sslConnectionSocketFactory(SSLConnectionSocketFactory sslConnectionSocketFactory);
51+
}

0 commit comments

Comments
 (0)