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 7
7
import me .chanjar .weixin .mp .bean .template .WxMpTemplateMessage ;
8
8
import me .chanjar .weixin .mp .util .json .WxMpGsonBuilder ;
9
9
10
+ import java .io .Serializable ;
11
+
10
12
/**
11
13
* @author Mklaus
12
14
* @date 2018-01-22 下午12:18
@@ -41,7 +43,7 @@ public class WxMpSubscribeMessage {
41
43
*
42
44
* @see #url
43
45
*/
44
- private WxMpTemplateMessage . MiniProgram miniProgram ;
46
+ private MiniProgram miniProgram ;
45
47
46
48
/**
47
49
* 订阅场景值
@@ -68,5 +70,13 @@ public String toJson() {
68
70
return WxMpGsonBuilder .INSTANCE .create ().toJson (this );
69
71
}
70
72
73
+ @ Data
74
+ @ NoArgsConstructor
75
+ @ AllArgsConstructor
76
+ public static class MiniProgram implements Serializable {
77
+ private static final long serialVersionUID = -7945254706501974849L ;
71
78
79
+ private String appid ;
80
+ private String pagePath ;
81
+ }
72
82
}
Original file line number Diff line number Diff line change 1
1
package me .chanjar .weixin .mp .bean .subscribe ;
2
2
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 .* ;
6
6
7
7
/**
8
8
* @author Mklaus
@@ -33,7 +33,7 @@ public void testToJson() {
33
33
.toUser ("OPENID" )
34
34
.templateId ("TEMPLATE_ID" )
35
35
.url ("URL" )
36
- .miniProgram (new WxMpTemplateMessage .MiniProgram ("xiaochengxuappid12345" , "index?foo=bar" ))
36
+ .miniProgram (new WxMpSubscribeMessage .MiniProgram ("xiaochengxuappid12345" , "index?foo=bar" ))
37
37
.scene ("SCENE" )
38
38
.title ("TITLE" )
39
39
.contentValue ("VALUE" )
You can’t perform that action at this time.
0 commit comments