From ee836c319382a51a45bb79aaa44662acbca00c39 Mon Sep 17 00:00:00 2001 From: jinyu Date: Tue, 9 Aug 2016 15:58:44 +0800 Subject: [PATCH] version upgrade to 1.7.1 --- CHANGE.md | 4 +- pom.xml | 520 +++++++++--------- weixin4j-base/pom.xml | 2 +- .../weixin4j/model/qr/QRParameter.java | 33 +- .../weixin4j/payment/WeixinPayProxy.java | 2 +- .../com/foxinmy/weixin4j/util/Consts.java | 1 + weixin4j-mp/CHANGE.md | 8 +- weixin4j-mp/pom.xml | 2 +- .../weixin4j/mp/WeixinComponentProxy.java | 2 +- .../com/foxinmy/weixin4j/mp/WeixinProxy.java | 2 +- weixin4j-qy/CHANGE.md | 6 +- weixin4j-qy/pom.xml | 2 +- .../com/foxinmy/weixin4j/qy/WeixinProxy.java | 2 +- .../foxinmy/weixin4j/qy/WeixinSuiteProxy.java | 2 +- 14 files changed, 311 insertions(+), 277 deletions(-) diff --git a/CHANGE.md b/CHANGE.md index a836bfe8..c0ec15b7 100644 --- a/CHANGE.md +++ b/CHANGE.md @@ -753,4 +753,6 @@ + weixin4j-base:修复媒体消息转换错误bug - + weixin4j-mp:新增创建卡券二维码接口 \ No newline at end of file + + weixin4j-mp:新增创建卡券二维码接口 + + + version upgrade to 1.7.1 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 78987f73..6dee9a97 100644 --- a/pom.xml +++ b/pom.xml @@ -1,261 +1,261 @@ - - - 4.0.0 - com.foxinmy - weixin4j - 1.7.0 - pom - weixin4j - https://github.com/foxinmy/weixin4j - 微信开发工具包 - 2014 - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - A business-friendly OSS license - - - - https://github.com/foxinmy/weixin4j - scm:git:git://github.com/foxinmy/weixin4j.git - scm:git:git@github.com:foxinmy/weixin4j.git - HEAD - - - https://github.com/foxinmy/weixin4j/issues - - - - hujinyuhao@163.com - jinyu - jinyu - https://github.com/foxinmy - +8 - - java developer - - - - - weixin4j-base - weixin4j-mp - weixin4j-qy - weixin4j-server - weixin4j-example - - - UTF-8 - 1.6 - 1.6 - 1.2.3 - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.0 - - 1.6 - 1.6 - ${project.build.sourceEncoding} - - - - org.apache.maven.plugins - maven-resources-plugin - 2.6 - - ${project.build.sourceEncoding} - - - pem - pfx - p12 - jks - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.5 - - - default-jar - package - - jar - - - target/classes - - *.properties - *.xml - *.txt - **/*.md - - - true - - true - - - - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.4 - - - attach-sources - - jar-no-fork - - - - - - *.properties - *.xml - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.1 - - - attach-javadocs - - jar - - - - - public - ${project.build.sourceEncoding} - ${project.build.sourceEncoding} - ${project.build.sourceEncoding} - - http://docs.oracle.com/javase/7/docs/api - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - verify - - sign - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.18 - - true - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.5.1 - - - ../assembly.xml - - - - - make-assembly - package - - single - - - - - - - - - src/main/java - - **/*.xml - **/*.properties - **/*.pem - **/*.p12 - **/*.pfx - - - - src/main/resources - - **/*.xml - **/*.properties - - - - - - - release - - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-javadoc-plugin - - - org.apache.maven.plugins - maven-gpg-plugin - - - - - - - - - junit - junit - 4.8.2 - test - - - - - - oss-snapshot - https://oss.sonatype.org/content/repositories/snapshots/ - - - oss-release - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - + + + 4.0.0 + com.foxinmy + weixin4j + 1.7.1 + pom + weixin4j + https://github.com/foxinmy/weixin4j + 微信开发工具包 + 2014 + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + A business-friendly OSS license + + + + https://github.com/foxinmy/weixin4j + scm:git:git://github.com/foxinmy/weixin4j.git + scm:git:git@github.com:foxinmy/weixin4j.git + HEAD + + + https://github.com/foxinmy/weixin4j/issues + + + + hujinyuhao@163.com + jinyu + jinyu + https://github.com/foxinmy + +8 + + java developer + + + + + weixin4j-base + weixin4j-mp + weixin4j-qy + weixin4j-server + weixin4j-example + + + UTF-8 + 1.6 + 1.6 + 1.2.3 + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.0 + + 1.6 + 1.6 + ${project.build.sourceEncoding} + + + + org.apache.maven.plugins + maven-resources-plugin + 2.6 + + ${project.build.sourceEncoding} + + + pem + pfx + p12 + jks + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.5 + + + default-jar + package + + jar + + + target/classes + + *.properties + *.xml + *.txt + **/*.md + + + true + + true + + + + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.4 + + + attach-sources + + jar-no-fork + + + + + + *.properties + *.xml + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.1 + + + attach-javadocs + + jar + + + + + public + ${project.build.sourceEncoding} + ${project.build.sourceEncoding} + ${project.build.sourceEncoding} + + http://docs.oracle.com/javase/7/docs/api + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + verify + + sign + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.18 + + true + + + + org.apache.maven.plugins + maven-assembly-plugin + 2.5.1 + + + ../assembly.xml + + + + + make-assembly + package + + single + + + + + + + + + src/main/java + + **/*.xml + **/*.properties + **/*.pem + **/*.p12 + **/*.pfx + + + + src/main/resources + + **/*.xml + **/*.properties + + + + + + + release + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + org.apache.maven.plugins + maven-gpg-plugin + + + + + + + + + junit + junit + 4.8.2 + test + + + + + + oss-snapshot + https://oss.sonatype.org/content/repositories/snapshots/ + + + oss-release + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + \ No newline at end of file diff --git a/weixin4j-base/pom.xml b/weixin4j-base/pom.xml index a9029341..c27eead2 100644 --- a/weixin4j-base/pom.xml +++ b/weixin4j-base/pom.xml @@ -5,7 +5,7 @@ com.foxinmy weixin4j - 1.7.0 + 1.7.1 weixin4j-base weixin4j-base diff --git a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/qr/QRParameter.java b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/qr/QRParameter.java index ae7fbec7..a3133d51 100644 --- a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/qr/QRParameter.java +++ b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/model/qr/QRParameter.java @@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.annotation.JSONField; import com.foxinmy.weixin4j.model.card.CardQR; import com.foxinmy.weixin4j.type.QRType; +import com.foxinmy.weixin4j.util.Consts; /** * 二维码参数对象 @@ -22,7 +23,7 @@ import com.foxinmy.weixin4j.type.QRType; public class QRParameter implements Serializable { private static final long serialVersionUID = 6611187606558274253L; - + /** * 二维码的类型 * @@ -35,6 +36,11 @@ public class QRParameter implements Serializable { */ @JSONField(name = "expire_seconds") private Integer expireSeconds; + /** + * 二维码的场景值 + */ + @JSONField(serialize = false) + private String sceneValue; /** * 二维码的内容 */ @@ -42,9 +48,10 @@ public class QRParameter implements Serializable { private JSONObject sceneContent; private QRParameter(QRType qrType, Integer expireSeconds, - JSONObject sceneContent) { + String sceneValue, JSONObject sceneContent) { this.qrType = qrType; this.expireSeconds = expireSeconds; + this.sceneValue = sceneValue; this.sceneContent = sceneContent; } @@ -56,6 +63,10 @@ public class QRParameter implements Serializable { return qrType; } + public String getSceneValue() { + return sceneValue; + } + public JSONObject getSceneContent() { return sceneContent; } @@ -75,7 +86,8 @@ public class QRParameter implements Serializable { JSONObject scene = new JSONObject(); scene.put("scene_id", sceneValue); sceneContent.put("scene", scene); - return new QRParameter(QRType.QR_SCENE, expireSeconds, sceneContent); + return new QRParameter(QRType.QR_SCENE, expireSeconds, + Long.toString(sceneValue), sceneContent); } /** @@ -89,7 +101,8 @@ public class QRParameter implements Serializable { JSONObject scene = new JSONObject(); scene.put("scene_id", sceneValue); sceneContent.put("scene", scene); - return new QRParameter(QRType.QR_LIMIT_SCENE, null, sceneContent); + return new QRParameter(QRType.QR_LIMIT_SCENE, null, + Integer.toString(sceneValue), sceneContent); } /** @@ -103,7 +116,8 @@ public class QRParameter implements Serializable { JSONObject scene = new JSONObject(); scene.put("scene_str", sceneValue); sceneContent.put("scene", scene); - return new QRParameter(QRType.QR_LIMIT_STR_SCENE, null, sceneContent); + return new QRParameter(QRType.QR_LIMIT_STR_SCENE, null, sceneValue, + sceneContent); } /** @@ -118,15 +132,22 @@ public class QRParameter implements Serializable { CardQR... cardQRs) { QRType qrType = QRType.QR_CARD; JSONObject sceneContent = new JSONObject(); + StringBuilder sceneValue = new StringBuilder(); + sceneValue.append(cardQRs[0].getSceneValue()); if (cardQRs.length > 1) { qrType = QRType.QR_MULTIPLE_CARD; JSONObject multipleCard = new JSONObject(); multipleCard.put("card_list", cardQRs); sceneContent.put("multiple_card", multipleCard); + for (int i = 1; i < cardQRs.length; i++) { + sceneValue.append(Consts.SEPARATOR).append( + cardQRs[i].getSceneValue()); + } } else { sceneContent.put("card", cardQRs[0]); } - return new QRParameter(qrType, expireSeconds, sceneContent); + return new QRParameter(qrType, expireSeconds, sceneValue.toString(), + sceneContent); } @Override diff --git a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/payment/WeixinPayProxy.java b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/payment/WeixinPayProxy.java index 7cdb4dc5..6688d2ea 100644 --- a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/payment/WeixinPayProxy.java +++ b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/payment/WeixinPayProxy.java @@ -951,5 +951,5 @@ public class WeixinPayProxy { return customsApi.queryCustomsOrder(idQuery, customsCity); } - public final static String VERSION = "1.7.0"; + public final static String VERSION = "1.7.1"; } diff --git a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/util/Consts.java b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/util/Consts.java index 768b0451..70969b44 100644 --- a/weixin4j-base/src/main/java/com/foxinmy/weixin4j/util/Consts.java +++ b/weixin4j-base/src/main/java/com/foxinmy/weixin4j/util/Consts.java @@ -28,4 +28,5 @@ public final class Consts { public static final String SHA1 = "SHA-1"; public static final String PROTOCOL_FILE = "file"; public static final String PROTOCOL_JAR = "jar"; + public static final String SEPARATOR = ","; } diff --git a/weixin4j-mp/CHANGE.md b/weixin4j-mp/CHANGE.md index 385f102e..4e41156d 100644 --- a/weixin4j-mp/CHANGE.md +++ b/weixin4j-mp/CHANGE.md @@ -242,4 +242,10 @@ * 2016-08-05 - + 新增CardApi:创建卡券接口 \ No newline at end of file + + 新增CardApi:创建卡券接口 + +* 2016-08-09 + + + 新增创建卡券二维码接口 + + + version upgrade to 1.7.1 \ No newline at end of file diff --git a/weixin4j-mp/pom.xml b/weixin4j-mp/pom.xml index 5cb861e2..670c48de 100644 --- a/weixin4j-mp/pom.xml +++ b/weixin4j-mp/pom.xml @@ -5,7 +5,7 @@ com.foxinmy weixin4j - 1.7.0 + 1.7.1 weixin4j-mp weixin4j-mp diff --git a/weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/WeixinComponentProxy.java b/weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/WeixinComponentProxy.java index 39c7e4ea..d033b9eb 100644 --- a/weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/WeixinComponentProxy.java +++ b/weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/WeixinComponentProxy.java @@ -185,5 +185,5 @@ public class WeixinComponentProxy { component(componentId).getTokenManager()); } - public final static String VERSION = "1.7.0"; + public final static String VERSION = "1.7.1"; } diff --git a/weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/WeixinProxy.java b/weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/WeixinProxy.java index a656ef59..7a76e35d 100644 --- a/weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/WeixinProxy.java +++ b/weixin4j-mp/src/main/java/com/foxinmy/weixin4j/mp/WeixinProxy.java @@ -1926,5 +1926,5 @@ public class WeixinProxy { return cardApi.createCardQR(expireSeconds, cardQRs); } - public final static String VERSION = "1.7.0"; + public final static String VERSION = "1.7.1"; } diff --git a/weixin4j-qy/CHANGE.md b/weixin4j-qy/CHANGE.md index 183b6bee..471f88ed 100644 --- a/weixin4j-qy/CHANGE.md +++ b/weixin4j-qy/CHANGE.md @@ -187,4 +187,8 @@ * 2016-06-20 - + version upgrade to 1.7.0 \ No newline at end of file + + version upgrade to 1.7.0 + +* 2016-08-09 + + + version upgrade to 1.7.1 \ No newline at end of file diff --git a/weixin4j-qy/pom.xml b/weixin4j-qy/pom.xml index 3a2f1083..187e44bb 100644 --- a/weixin4j-qy/pom.xml +++ b/weixin4j-qy/pom.xml @@ -5,7 +5,7 @@ com.foxinmy weixin4j - 1.7.0 + 1.7.1 weixin4j-qy weixin4j-qy diff --git a/weixin4j-qy/src/main/java/com/foxinmy/weixin4j/qy/WeixinProxy.java b/weixin4j-qy/src/main/java/com/foxinmy/weixin4j/qy/WeixinProxy.java index 9d43ca0e..51ba4afe 100644 --- a/weixin4j-qy/src/main/java/com/foxinmy/weixin4j/qy/WeixinProxy.java +++ b/weixin4j-qy/src/main/java/com/foxinmy/weixin4j/qy/WeixinProxy.java @@ -1353,5 +1353,5 @@ public class WeixinProxy { return chatApi.sendChatMessage(message); } - public final static String VERSION = "1.7.0"; + public final static String VERSION = "1.7.1"; } diff --git a/weixin4j-qy/src/main/java/com/foxinmy/weixin4j/qy/WeixinSuiteProxy.java b/weixin4j-qy/src/main/java/com/foxinmy/weixin4j/qy/WeixinSuiteProxy.java index 477e6433..4b733b2f 100644 --- a/weixin4j-qy/src/main/java/com/foxinmy/weixin4j/qy/WeixinSuiteProxy.java +++ b/weixin4j-qy/src/main/java/com/foxinmy/weixin4j/qy/WeixinSuiteProxy.java @@ -243,5 +243,5 @@ public class WeixinSuiteProxy { return new WeixinProxy(suite(suiteId).getPerTicketManager(authCorpId), suite(suiteId).getTokenManager()); } - public final static String VERSION = "1.7.0"; + public final static String VERSION = "1.7.1"; }