version upgrade to 1.7.1
This commit is contained in:
parent
46b496c84c
commit
ee836c3193
@ -754,3 +754,5 @@
|
||||
+ weixin4j-base:修复媒体消息转换错误bug
|
||||
|
||||
+ weixin4j-mp:新增创建卡券二维码接口
|
||||
|
||||
+ version upgrade to 1.7.1
|
||||
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.foxinmy</groupId>
|
||||
<artifactId>weixin4j</artifactId>
|
||||
<version>1.7.0</version>
|
||||
<version>1.7.1</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>weixin4j</name>
|
||||
<url>https://github.com/foxinmy/weixin4j</url>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.foxinmy</groupId>
|
||||
<artifactId>weixin4j</artifactId>
|
||||
<version>1.7.0</version>
|
||||
<version>1.7.1</version>
|
||||
</parent>
|
||||
<artifactId>weixin4j-base</artifactId>
|
||||
<name>weixin4j-base</name>
|
||||
|
||||
@ -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;
|
||||
|
||||
/**
|
||||
* 二维码参数对象
|
||||
@ -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
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
@ -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 = ",";
|
||||
}
|
||||
|
||||
@ -243,3 +243,9 @@
|
||||
* 2016-08-05
|
||||
|
||||
+ 新增CardApi:创建卡券接口
|
||||
|
||||
* 2016-08-09
|
||||
|
||||
+ 新增创建卡券二维码接口
|
||||
|
||||
+ version upgrade to 1.7.1
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.foxinmy</groupId>
|
||||
<artifactId>weixin4j</artifactId>
|
||||
<version>1.7.0</version>
|
||||
<version>1.7.1</version>
|
||||
</parent>
|
||||
<artifactId>weixin4j-mp</artifactId>
|
||||
<name>weixin4j-mp</name>
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
@ -188,3 +188,7 @@
|
||||
* 2016-06-20
|
||||
|
||||
+ version upgrade to 1.7.0
|
||||
|
||||
* 2016-08-09
|
||||
|
||||
+ version upgrade to 1.7.1
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.foxinmy</groupId>
|
||||
<artifactId>weixin4j</artifactId>
|
||||
<version>1.7.0</version>
|
||||
<version>1.7.1</version>
|
||||
</parent>
|
||||
<artifactId>weixin4j-qy</artifactId>
|
||||
<name>weixin4j-qy</name>
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user