diff --git a/CHANGE.md b/CHANGE.md index e1a323a5..389965d0 100644 --- a/CHANGE.md +++ b/CHANGE.md @@ -204,4 +204,13 @@ + **weixin4j-qy**: 新增deploy.xml远程部署ant脚本 +* 2015-03-29 + + + **weixin4j-base**: 单行注释调整为多行文档注释 + + + **weixin4j-mp**: 单行注释调整为多行文档注释 + + + **weixin4j-mp**: 新增(CouponApi)[./weixin4j-mp/weixin4j-mp-api/src/main/java/com/foxinmy/weixin4j/mp/api/CouponApi.java]代金券接口 + + + **weixin4j-qy**: 单行注释调整为多行文档注释 \ No newline at end of file diff --git a/README.md b/README.md index 5ffa01f1..b2f73d61 100644 --- a/README.md +++ b/README.md @@ -71,12 +71,16 @@ netty的代码没有放到maven中心仓库,也没什么意义,因为最终需 接下来 ------ -* 代金券 & 红包接口 +* 企业号异步接口 + +* 红包和企业付款接口 * 公众号服务应用 * 企业号第三方应用 +* 企业号登陆授权 + * 微信小店 * 微信卡券 \ No newline at end of file diff --git a/weixin4j-base/README.md b/weixin4j-base/README.md index ac8d0013..176fbc37 100644 --- a/weixin4j-base/README.md +++ b/weixin4j-base/README.md @@ -47,4 +47,8 @@ weixin4j-base + 重构token实现机制 - + 新增JSTICKET支持 \ No newline at end of file + + 新增JSTICKET支持 + +* 2015-03-29 + + + 单行注释调整为多行文档注释 \ No newline at end of file diff --git a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/HttpRequest.java b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/HttpRequest.java index 92f8f78e..9a8f3cfb 100644 --- a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/HttpRequest.java +++ b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/http/HttpRequest.java @@ -196,10 +196,11 @@ public class HttpRequest { EntityUtils.consume(httpEntity); Header contentType = httpResponse .getFirstHeader(HttpHeaders.CONTENT_TYPE); + System.err.println(response.getAsString()); // error with html if (contentType.getValue().contains( ContentType.TEXT_HTML.getMimeType())) { - response.setText(new String(data, "gbk")); + // response.setText(new String(data, "gbk")); try { checkJson(response); return response; diff --git a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/BaseMsg.java b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/BaseMsg.java index 94f95021..805d9312 100644 --- a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/BaseMsg.java +++ b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/BaseMsg.java @@ -16,18 +16,38 @@ public class BaseMsg implements Serializable { private static final long serialVersionUID = 7761192742840031607L; + /** + * 开发者微信号 + */ @XStreamAlias("ToUserName") - private String toUserName; // 开发者微信号 + private String toUserName; + /** + * 发送方账号 即用户的openid + */ @XStreamAlias("FromUserName") - private String fromUserName; // 发送方帐号(一个OpenID) + private String fromUserName; + /** + * 消息创建时间 系统毫秒数 + */ @XStreamAlias("CreateTime") - private long createTime = System.currentTimeMillis(); // 消息创建时间 (整型) + private long createTime = System.currentTimeMillis(); + /** + * 消息类型 + * + * @see com.foxinmy.weixin4j.type.MessageType + */ @XStreamAlias("MsgType") - private String msgType; // 消息类型 + private String msgType; + /** + * 消息ID 可用于排重 + */ @XStreamAlias("MsgId") - private long msgId; // 消息ID + private long msgId; @XStreamAlias("AgentID") - private String agentId; // 企业号独有的应用ID + /** + * 企业号独有的应用ID + */ + private String agentId; public BaseMsg() { diff --git a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/Button.java b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/Button.java index a4406b1c..7c65787d 100644 --- a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/Button.java +++ b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/Button.java @@ -24,17 +24,39 @@ public class Button implements Serializable { private static final long serialVersionUID = -6422234732203854866L; + /** + * 菜单标题,不超过16个字节,子菜单不超过40个字节 + */ private String name; - private ButtonType type; // 菜单的响应动作类型 - private String key; // click等点击类型必须 - private String url; // view类型必须 - + /** + * 菜单的响应动作类型 + * + * @see com.foxinmy.weixin4j.type.ButtonType + */ + private ButtonType type; + /** + * 菜单KEY值,用于消息接口推送,不超过128字节 + */ + private String key; + /** + * view类型必须 网页链接,用户点击菜单可打开链接,不超过256字节 + */ + private String url; + /** + * 二级菜单数组,个数应为1~5个 + */ @JSONField(name = "sub_button") private List