File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
main/java/me/chanjar/weixin/mp/bean/subscribe
test/java/me/chanjar/weixin/mp/bean/subscribe Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 77import me .chanjar .weixin .mp .bean .template .WxMpTemplateMessage ;
88import me .chanjar .weixin .mp .util .json .WxMpGsonBuilder ;
99
10+ import java .io .Serializable ;
11+
1012/**
1113 * @author Mklaus
1214 * @date 2018-01-22 下午12:18
@@ -41,7 +43,7 @@ public class WxMpSubscribeMessage {
4143 *
4244 * @see #url
4345 */
44- private WxMpTemplateMessage . MiniProgram miniProgram ;
46+ private MiniProgram miniProgram ;
4547
4648 /**
4749 * 订阅场景值
@@ -68,5 +70,13 @@ public String toJson() {
6870 return WxMpGsonBuilder .INSTANCE .create ().toJson (this );
6971 }
7072
73+ @ Data
74+ @ NoArgsConstructor
75+ @ AllArgsConstructor
76+ public static class MiniProgram implements Serializable {
77+ private static final long serialVersionUID = -7945254706501974849L ;
7178
79+ private String appid ;
80+ private String pagePath ;
81+ }
7282}
Original file line number Diff line number Diff line change 11package me .chanjar .weixin .mp .bean .subscribe ;
22
3- import me . chanjar . weixin . mp . bean . template . WxMpTemplateMessage ;
4- import org . testng . annotations . Test ;
5- import static org .testng .AssertJUnit .assertEquals ;
3+ import org . testng . annotations .* ;
4+
5+ import static org .testng .AssertJUnit .* ;
66
77/**
88 * @author Mklaus
@@ -33,7 +33,7 @@ public void testToJson() {
3333 .toUser ("OPENID" )
3434 .templateId ("TEMPLATE_ID" )
3535 .url ("URL" )
36- .miniProgram (new WxMpTemplateMessage .MiniProgram ("xiaochengxuappid12345" , "index?foo=bar" ))
36+ .miniProgram (new WxMpSubscribeMessage .MiniProgram ("xiaochengxuappid12345" , "index?foo=bar" ))
3737 .scene ("SCENE" )
3838 .title ("TITLE" )
3939 .contentValue ("VALUE" )
You can’t perform that action at this time.
0 commit comments