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 {
7474 * </pre>
7575 */
7676 @ SerializedName ("expire_time" )
77- private Integer expireTime ;
77+ private Long expireTime ;
7878
7979 /**
8080 * 到期失效的URL Link的失效间隔天数。生成的到期失效URL Link在该间隔时间到达前有效。最长间隔天数为365天。expire_type 为 1 必填
Original file line number Diff line number Diff line change 1010import org .testng .annotations .Guice ;
1111import org .testng .annotations .Test ;
1212
13+ import java .time .LocalDateTime ;
14+ import java .time .ZoneId ;
15+
1316@ Test
1417@ Guice (modules = ApiTestModule .class )
1518@ Slf4j
@@ -21,6 +24,7 @@ public class WxMaLinkServiceImplTest {
2124 public void testGenerateUrlLink () throws WxErrorException {
2225 String url = this .wxMaService .getLinkService ().generateUrlLink (GenerateUrlLinkRequest .builder ()
2326 .path ("pages/tabBar/home/home" )
27+ .expireTime (LocalDateTime .now ().plusDays (5 ).atZone (ZoneId .systemDefault ()).toEpochSecond ()) //增加有效期,此行可注释
2428 .build ());
2529
2630 System .out .println (url );
You can’t perform that action at this time.
0 commit comments