This commit is contained in:
jinyu 2016-03-23 09:45:26 +08:00
parent 042b788b1c
commit 02436ff2df

View File

@ -63,14 +63,14 @@ public class QRParameter implements Serializable {
* @param expireSeconds * @param expireSeconds
* 有效时间 * 有效时间
* @param sceneValue * @param sceneValue
* 二维码的场景值 * 二维码的场景值 <font color="red">临时二维码最大值为无符号非0整型</font>
* @return 二维码参数 * @return 二维码参数
*/ */
public static QRParameter createTemporary(int expireSeconds, int sceneValue) { public static QRParameter createTemporary(int expireSeconds, long sceneValue) {
QRParameter qr = new QRParameter(); QRParameter qr = new QRParameter();
qr.qrType = QRType.QR_SCENE; qr.qrType = QRType.QR_SCENE;
qr.expireSeconds = expireSeconds; qr.expireSeconds = expireSeconds;
qr.sceneValue = Integer.toString(sceneValue); qr.sceneValue = Long.toString(sceneValue);
qr.content = String qr.content = String
.format("{\"expire_seconds\": %s, \"action_name\": \"%s\", \"action_info\": {\"scene\": {\"scene_id\": %s}}}", .format("{\"expire_seconds\": %s, \"action_name\": \"%s\", \"action_info\": {\"scene\": {\"scene_id\": %s}}}",
expireSeconds, QRType.QR_SCENE.name(), sceneValue); expireSeconds, QRType.QR_SCENE.name(), sceneValue);