mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-25 01:14:36 +08:00
修复代码
This commit is contained in:
parent
b4cf79fd15
commit
ae4cf4d9d0
@ -7,6 +7,8 @@ import lombok.NoArgsConstructor;
|
|||||||
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
|
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
|
||||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mklaus
|
* @author Mklaus
|
||||||
* @date 2018-01-22 下午12:18
|
* @date 2018-01-22 下午12:18
|
||||||
@ -41,7 +43,7 @@ public class WxMpSubscribeMessage {
|
|||||||
*
|
*
|
||||||
* @see #url
|
* @see #url
|
||||||
*/
|
*/
|
||||||
private WxMpTemplateMessage.MiniProgram miniProgram;
|
private MiniProgram miniProgram;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订阅场景值
|
* 订阅场景值
|
||||||
@ -68,5 +70,13 @@ public class WxMpSubscribeMessage {
|
|||||||
return WxMpGsonBuilder.INSTANCE.create().toJson(this);
|
return WxMpGsonBuilder.INSTANCE.create().toJson(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class MiniProgram implements Serializable {
|
||||||
|
private static final long serialVersionUID = -7945254706501974849L;
|
||||||
|
|
||||||
|
private String appid;
|
||||||
|
private String pagePath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package me.chanjar.weixin.mp.bean.subscribe;
|
package me.chanjar.weixin.mp.bean.subscribe;
|
||||||
|
|
||||||
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
|
import org.testng.annotations.*;
|
||||||
import org.testng.annotations.Test;
|
|
||||||
import static org.testng.AssertJUnit.assertEquals;
|
import static org.testng.AssertJUnit.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Mklaus
|
* @author Mklaus
|
||||||
@ -33,7 +33,7 @@ public class WxMpSubscribeMessageTest {
|
|||||||
.toUser("OPENID")
|
.toUser("OPENID")
|
||||||
.templateId("TEMPLATE_ID")
|
.templateId("TEMPLATE_ID")
|
||||||
.url("URL")
|
.url("URL")
|
||||||
.miniProgram(new WxMpTemplateMessage.MiniProgram("xiaochengxuappid12345", "index?foo=bar"))
|
.miniProgram(new WxMpSubscribeMessage.MiniProgram("xiaochengxuappid12345", "index?foo=bar"))
|
||||||
.scene("SCENE")
|
.scene("SCENE")
|
||||||
.title("TITLE")
|
.title("TITLE")
|
||||||
.contentValue("VALUE")
|
.contentValue("VALUE")
|
||||||
|
Loading…
Reference in New Issue
Block a user