Skip to content

Commit

Permalink
🐛 #2973 【小程序】修改获取url link接口请求类中的expireTime属性类型为Long
Browse files Browse the repository at this point in the history
  • Loading branch information
gang2113920 authored Apr 10, 2023
1 parent 43a3a1e commit e0e03d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class GenerateUrlLinkRequest implements Serializable {
* </pre>
*/
@SerializedName("expire_time")
private Integer expireTime;
private Long expireTime;

/**
* 到期失效的URL Link的失效间隔天数。生成的到期失效URL Link在该间隔时间到达前有效。最长间隔天数为365天。expire_type 为 1 必填
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import org.testng.annotations.Guice;
import org.testng.annotations.Test;

import java.time.LocalDateTime;
import java.time.ZoneId;

@Test
@Guice(modules = ApiTestModule.class)
@Slf4j
Expand All @@ -21,6 +24,7 @@ public class WxMaLinkServiceImplTest {
public void testGenerateUrlLink() throws WxErrorException {
String url = this.wxMaService.getLinkService().generateUrlLink(GenerateUrlLinkRequest.builder()
.path("pages/tabBar/home/home")
.expireTime(LocalDateTime.now().plusDays(5).atZone(ZoneId.systemDefault()).toEpochSecond()) //增加有效期,此行可注释
.build());

System.out.println(url);
Expand Down

0 comments on commit e0e03d8

Please sign in to comment.