mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-06-28 13:16:19 +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.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Mklaus
|
||||
* @date 2018-01-22 下午12:18
|
||||
@ -41,7 +43,7 @@ public class WxMpSubscribeMessage {
|
||||
*
|
||||
* @see #url
|
||||
*/
|
||||
private WxMpTemplateMessage.MiniProgram miniProgram;
|
||||
private MiniProgram miniProgram;
|
||||
|
||||
/**
|
||||
* 订阅场景值
|
||||
@ -68,5 +70,13 @@ public class WxMpSubscribeMessage {
|
||||
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;
|
||||
|
||||
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
|
||||
import org.testng.annotations.Test;
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import org.testng.annotations.*;
|
||||
|
||||
import static org.testng.AssertJUnit.*;
|
||||
|
||||
/**
|
||||
* @author Mklaus
|
||||
@ -33,7 +33,7 @@ public class WxMpSubscribeMessageTest {
|
||||
.toUser("OPENID")
|
||||
.templateId("TEMPLATE_ID")
|
||||
.url("URL")
|
||||
.miniProgram(new WxMpTemplateMessage.MiniProgram("xiaochengxuappid12345", "index?foo=bar"))
|
||||
.miniProgram(new WxMpSubscribeMessage.MiniProgram("xiaochengxuappid12345", "index?foo=bar"))
|
||||
.scene("SCENE")
|
||||
.title("TITLE")
|
||||
.contentValue("VALUE")
|
||||
|
Loading…
Reference in New Issue
Block a user