FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

1.修复bug:小程序获取url link的请求封装类GenerateUrlLinkRequest中expireTime属性应为Long,… by gang2113920 · Pull Request #2974 · binarywang/WxJava · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .java  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL