File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
main/java/cn/binarywang/wx/miniapp/bean/urllink
test/java/cn/binarywang/wx/miniapp/api/impl Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ public class GenerateUrlLinkRequest implements Serializable {
74
74
* </pre>
75
75
*/
76
76
@ SerializedName ("expire_time" )
77
- private Integer expireTime ;
77
+ private Long expireTime ;
78
78
79
79
/**
80
80
* 到期失效的URL Link的失效间隔天数。生成的到期失效URL Link在该间隔时间到达前有效。最长间隔天数为365天。expire_type 为 1 必填
Original file line number Diff line number Diff line change 10
10
import org .testng .annotations .Guice ;
11
11
import org .testng .annotations .Test ;
12
12
13
+ import java .time .LocalDateTime ;
14
+ import java .time .ZoneId ;
15
+
13
16
@ Test
14
17
@ Guice (modules = ApiTestModule .class )
15
18
@ Slf4j
@@ -21,6 +24,7 @@ public class WxMaLinkServiceImplTest {
21
24
public void testGenerateUrlLink () throws WxErrorException {
22
25
String url = this .wxMaService .getLinkService ().generateUrlLink (GenerateUrlLinkRequest .builder ()
23
26
.path ("pages/tabBar/home/home" )
27
+ .expireTime (LocalDateTime .now ().plusDays (5 ).atZone (ZoneId .systemDefault ()).toEpochSecond ()) //增加有效期,此行可注释
24
28
.build ());
25
29
26
30
System .out .println (url );
You can’t perform that action at this time.
0 commit comments