upgrade version to 1.6.6 & 1.1.5

This commit is contained in:
jinyu 2015-12-31 13:12:37 +08:00
parent 7a3f47fd2a
commit c8cb22b69a
17 changed files with 108 additions and 45 deletions

View File

@ -513,7 +513,6 @@
+ weixin4j-base:调整PayUtil#createNativePayRequestURL参数位置:从主到次 + weixin4j-base:调整PayUtil#createNativePayRequestURL参数位置:从主到次
* 2015-12-04 * 2015-12-04
+ weixin4j-base:【重要】修改PayUtil中的createPayJsRequest方法的返回值为MchPayRequest便于二次发起支付。 + weixin4j-base:【重要】修改PayUtil中的createPayJsRequest方法的返回值为MchPayRequest便于二次发起支付。
@ -534,7 +533,6 @@
+ weixin4j-base:调整Pay3Api#refundApply参数个数 + weixin4j-base:调整Pay3Api#refundApply参数个数
* 2015-12-10 * 2015-12-10
+ 添加可选[RedisTokenStorager](weixin4j-base/src/main/java/com/foxinmy/weixin4j/token/RedisTokenStorager.java) + 添加可选[RedisTokenStorager](weixin4j-base/src/main/java/com/foxinmy/weixin4j/token/RedisTokenStorager.java)
@ -543,7 +541,6 @@
+ 【特大注意】weixin4j.properties全部的属性名添加`weixin4j`前缀,并用`.`代替原来的`_` + 【特大注意】weixin4j.properties全部的属性名添加`weixin4j`前缀,并用`.`代替原来的`_`
* 2015-12-15 * 2015-12-15
+ weixin4j-[mp|qy]:version upgrade to 1.6.5 + weixin4j-[mp|qy]:version upgrade to 1.6.5
@ -554,17 +551,14 @@
+ weixin4j-mp:WeixinProxy.getCustomRecord 参数变更为 Date startTime, Date endTime, Pageable pageable + weixin4j-mp:WeixinProxy.getCustomRecord 参数变更为 Date startTime, Date endTime, Pageable pageable
* 2015-12-19 * 2015-12-19
+ weixin4j-base:删除PayUtil类,接口转移到PayApi类 + weixin4j-base:删除PayUtil类,接口转移到PayApi类
* 2015-12-21 * 2015-12-21
+ weixin4j-server:WeixinMessageHanlder中新增weight接口 + weixin4j-server:WeixinMessageHanlder中新增weight接口
* 2015-12-25 * 2015-12-25
+ weixin4j-base:WeixinPayProxy类新增获取支付信息#getWeixinAccount方法 + weixin4j-base:WeixinPayProxy类新增获取支付信息#getWeixinAccount方法
@ -597,7 +591,6 @@
+ weixin4j-server:DigestUtil 重命名为 DigestUtils + weixin4j-server:DigestUtil 重命名为 DigestUtils
* 2015-12-26 * 2015-12-26
+ weixin4j-base:MchPayRequest抽象化 + weixin4j-base:MchPayRequest抽象化
@ -608,8 +601,12 @@
+ weixin4j-server:删除无用的工具类并重新整理 + weixin4j-server:删除无用的工具类并重新整理
* 2015-12-30 * 2015-12-30
+ weixin4j-qy:新增服务商接口(ProviderApi) + weixin4j-qy:新增服务商接口(ProviderApi)
* 2015-12-31
+ weixin4j-[mp|qy]:version upgrade to 1.6.6
+ weixin4j-server:version upgrade to 1.1.5

View File

@ -26,26 +26,26 @@ weixin4j
如何获取 如何获取
---------- ----------
###1.maven依赖 ###1.maven依赖
微信公众平台API(1.6.5,2015-12-15 released) 微信公众平台API(1.6.6,2015-12-31 released)
<dependency> <dependency>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j-mp</artifactId> <artifactId>weixin4j-mp</artifactId>
<version>1.6.5</version> <version>1.6.6</version>
</dependency> </dependency>
微信企业号API(1.6.5,2015-12-15 released) 微信企业号API(1.6.6,2015-12-31 released)
<dependency> <dependency>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j-qy</artifactId> <artifactId>weixin4j-qy</artifactId>
<version>1.6.5</version> <version>1.6.6</version>
</dependency> </dependency>
微信回调消息服务器(1.1.4,2015-12-08 released) 微信回调消息服务器(1.1.5,2015-12-31 released)
<dependency> <dependency>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j-server</artifactId> <artifactId>weixin4j-server</artifactId>
<version>1.1.4</version> <version>1.1.5</version>
</dependency> </dependency>
###2.直接下载jar包 ###2.直接下载jar包

View File

@ -228,6 +228,10 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>

View File

@ -95,4 +95,18 @@
* 2015-12-19 * 2015-12-19
+ 删除PayUtil类,接口转移到PayApi类 + 删除PayUtil类,接口转移到PayApi类
* 2015-12-25
+ WeixinPayProxy类新增获取支付信息#getWeixinAccount方法
+ 新增JSSDK的config生成类
+ JSSDKHelper 重命名为 JSSDKConfigurator
+ 重构了token类
* 2015-12-26
+ MchPayRequest抽象化

View File

@ -110,8 +110,8 @@ public class JSSDKConfigurator {
signMap.put("noncestr", noncestr); signMap.put("noncestr", noncestr);
signMap.put("jsapi_ticket", this.ticketTokenHolder.getAccessToken()); signMap.put("jsapi_ticket", this.ticketTokenHolder.getAccessToken());
signMap.put("url", url); signMap.put("url", url);
String sign = DigestUtil.SHA1(MapUtil String sign = DigestUtil.SHA1(MapUtil.toJoinString(signMap, false,
.toJoinString(signMap, false, false)); false));
if (StringUtil.isBlank(config.getString("appId"))) { if (StringUtil.isBlank(config.getString("appId"))) {
config.put("appId", Weixin4jConfigUtil.getWeixinAccount().getId()); config.put("appId", Weixin4jConfigUtil.getWeixinAccount().getId());
} }
@ -127,15 +127,4 @@ public class JSSDKConfigurator {
config.put("jsApiList", apis.toArray()); config.put("jsApiList", apis.toArray());
return config.toJSONString(); return config.toJSONString();
} }
public static void main(String[] args){
Map<String, String> signMap = new HashMap<String, String>();
signMap.put("timestamp", "1451291129");
signMap.put("noncestr", "FXlt1mmwNrU30AIGGNrdLcdO");
signMap.put("jsapi_ticket", "kgt8ON7yVITDhtdwci0qeQdDHdx7JYipird9HNRuaHAIXFpvYh0mz9vuWOjdZb8a3ftvHZKfqcLzrx_pTFOZ3Q");
signMap.put("url", "http://wx.jdxg.doubimeizhi.com/apprise/share");
String sign = DigestUtil.SHA1(MapUtil
.toJoinString(signMap, false, false));
System.err.println(sign);
}
} }

View File

@ -807,5 +807,5 @@ public class WeixinPayProxy {
return pay3Api.authCode2openId(authCode); return pay3Api.authCode2openId(authCode);
} }
public final static String VERSION = "1.6.5"; public final static String VERSION = "1.6.6";
} }

View File

@ -183,3 +183,19 @@
* 2015-12-18 * 2015-12-18
+ 新增个性化菜单接口 + 新增个性化菜单接口
+ WeixinProxy.getCustomRecord 参数变更为 Date startTime, Date endTime, Pageable pageable
* 2015-12-25
+ WeixinProxy新增获取appid(getAppId)方法
+ WeixinProxy新增获取jsticket(getJSTicketHolder)方法
+ 私有化WeixinProxy(TokenHolder)构造器
+ 调整WeixinTicketCreator类
* 2015-12-31
+ version upgrade to 1.6.6

View File

@ -35,12 +35,12 @@ weixin4j-mp
如何使用 如何使用
-------- --------
0.maven依赖(1.6.5,2015-12-15 released) 0.maven依赖(1.6.6,2015-12-31 released)
<dependency> <dependency>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j-mp</artifactId> <artifactId>weixin4j-mp</artifactId>
<version>1.6.5</version> <version>1.6.6</version>
</dependency> </dependency>
1.需新增或拷贝`weixin4j.properties`文件到项目的`classpath` 1.需新增或拷贝`weixin4j.properties`文件到项目的`classpath`

View File

@ -1436,5 +1436,5 @@ public class WeixinProxy {
return dataApi.datacube(datacubeType, date); return dataApi.datacube(datacubeType, date);
} }
public final static String VERSION = "1.6.5"; public final static String VERSION = "1.6.6";
} }

View File

@ -142,3 +142,25 @@
* 2015-12-15 * 2015-12-15
+ version upgrade to 1.6.5 + version upgrade to 1.6.5
* 2015-12-25
+ WeixinProxy新增获取corpid(getCorpId)方法
+ WeixinProxy新增获取jsticket(getJSTicketHolder)方法
+ 私有化WeixinProxy(TokenHolder)构造器
+ SuiteApi新增获取Weixinproxy对象(getWeixinProxy)方法
+ 删除WeixinJSTicketCreator类
+ 新增企业号联系人筛选配置类(JSSDKContactConfigurator)
* 2015-12-30
+ 新增服务商接口(ProviderApi)
* 2015-12-31
+ version upgrade to 1.6.6

View File

@ -36,12 +36,12 @@ weixin4j-qy
如何使用 如何使用
-------- --------
0.maven依赖(1.6.5,2015-12-15 released) 0.maven依赖(1.6.6,2015-12-31 released)
<dependency> <dependency>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j-qy</artifactId> <artifactId>weixin4j-qy</artifactId>
<version>1.6.5</version> <version>1.6.6</version>
</dependency> </dependency>
1.需新增或拷贝`weixin4j.properties`文件到项目的`classpath` 1.需新增或拷贝`weixin4j.properties`文件到项目的`classpath`

View File

@ -1303,5 +1303,5 @@ public class WeixinProxy {
return chatApi.sendChatMessage(message); return chatApi.sendChatMessage(message);
} }
public final static String VERSION = "1.6.5"; public final static String VERSION = "1.6.6";
} }

View File

@ -160,5 +160,5 @@ public class WeixinSuiteProxy {
return providerApi.getLoingUrl(corpId, targetType, agentId); return providerApi.getLoingUrl(corpId, targetType, agentId);
} }
public final static String VERSION = "1.6.5"; public final static String VERSION = "1.6.6";
} }

View File

@ -114,4 +114,20 @@
* 2015-12-21 * 2015-12-21
+ WeixinMessageHanlder中新增weight接口 + WeixinMessageHanlder中新增weight接口
* 2015-12-25
+ DigestUtil 重命名为 DigestUtils
* 2015-12-26
+ WeixinMessageInterceptor加入weight权重接口
+ 移入weixin4j下模块化
+ 删除无用的工具类并重新整理
* 2015-12-31
+ version upgrade to 1.1.5

View File

@ -15,12 +15,12 @@ base on netty.
如何使用 如何使用
------- -------
###maven依赖(1.1.4,2015-12-10 released) ###maven依赖(1.1.5,2015-12-31 released)
<dependency> <dependency>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j-server</artifactId> <artifactId>weixin4j-server</artifactId>
<version>1.1.4</version> <version>1.1.5</version>
</dependency> </dependency>
###编写服务启动类 ###编写服务启动类
明文模式并总是调试输出微信请求信息的服务启动类. 明文模式并总是调试输出微信请求信息的服务启动类.

View File

@ -86,7 +86,7 @@ public class WeixinMessageDispatcher {
/** /**
* 消息转换 * 消息转换
*/ */
private Map<Class<? extends WeixinMessage>, Unmarshaller> messageUnmarshaller; private ThreadLocal<Map<Class<? extends WeixinMessage>, Unmarshaller>> messageUnmarshaller;
/** /**
* 是否总是响应请求,如未匹配到MessageHandler时回复空白消息 * 是否总是响应请求,如未匹配到MessageHandler时回复空白消息
*/ */
@ -98,7 +98,12 @@ public class WeixinMessageDispatcher {
public WeixinMessageDispatcher(WeixinMessageMatcher messageMatcher) { public WeixinMessageDispatcher(WeixinMessageMatcher messageMatcher) {
this.messageMatcher = messageMatcher; this.messageMatcher = messageMatcher;
this.messageUnmarshaller = new HashMap<Class<? extends WeixinMessage>, Unmarshaller>(); this.messageUnmarshaller = new ThreadLocal<Map<Class<? extends WeixinMessage>, Unmarshaller>>() {
@Override
protected Map<Class<? extends WeixinMessage>, Unmarshaller> initialValue() {
return new HashMap<Class<? extends WeixinMessage>, Unmarshaller>();
}
};
} }
/** /**
@ -373,12 +378,12 @@ public class WeixinMessageDispatcher {
*/ */
protected Unmarshaller getUnmarshaller(Class<? extends WeixinMessage> clazz) protected Unmarshaller getUnmarshaller(Class<? extends WeixinMessage> clazz)
throws WeixinException { throws WeixinException {
Unmarshaller unmarshaller = messageUnmarshaller.get(clazz); Unmarshaller unmarshaller = messageUnmarshaller.get().get(clazz);
if (unmarshaller == null) { if (unmarshaller == null) {
try { try {
JAXBContext jaxbContext = JAXBContext.newInstance(clazz); JAXBContext jaxbContext = JAXBContext.newInstance(clazz);
unmarshaller = jaxbContext.createUnmarshaller(); unmarshaller = jaxbContext.createUnmarshaller();
messageUnmarshaller.put(clazz, unmarshaller); messageUnmarshaller.get().put(clazz, unmarshaller);
} catch (JAXBException e) { } catch (JAXBException e) {
throw new WeixinException(e); throw new WeixinException(e);
} }

View File

@ -315,5 +315,5 @@ public final class WeixinServerBootstrap {
return this; return this;
} }
public final static String VERSION = "1.1.4"; public final static String VERSION = "1.1.5";
} }