mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 02:28:25 +08:00 
			
		
		
		
	🐛 #2973 【小程序】修改获取url link接口请求类中的expireTime属性类型为Long
This commit is contained in:
		 The Wolf Chasing Dreams
					The Wolf Chasing Dreams
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							43a3a1e5a0
						
					
				
				
					commit
					e0e03d82ff
				
			| @ -74,7 +74,7 @@ public class GenerateUrlLinkRequest implements Serializable { | |||||||
|    * </pre> |    * </pre> | ||||||
|    */ |    */ | ||||||
|   @SerializedName("expire_time") |   @SerializedName("expire_time") | ||||||
|   private Integer expireTime; |   private Long expireTime; | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 到期失效的URL Link的失效间隔天数。生成的到期失效URL Link在该间隔时间到达前有效。最长间隔天数为365天。expire_type 为 1 必填 |    * 到期失效的URL Link的失效间隔天数。生成的到期失效URL Link在该间隔时间到达前有效。最长间隔天数为365天。expire_type 为 1 必填 | ||||||
|  | |||||||
| @ -10,6 +10,9 @@ import me.chanjar.weixin.common.error.WxErrorException; | |||||||
| import org.testng.annotations.Guice; | import org.testng.annotations.Guice; | ||||||
| import org.testng.annotations.Test; | import org.testng.annotations.Test; | ||||||
|  |  | ||||||
|  | import java.time.LocalDateTime; | ||||||
|  | import java.time.ZoneId; | ||||||
|  |  | ||||||
| @Test | @Test | ||||||
| @Guice(modules = ApiTestModule.class) | @Guice(modules = ApiTestModule.class) | ||||||
| @Slf4j | @Slf4j | ||||||
| @ -21,6 +24,7 @@ public class WxMaLinkServiceImplTest { | |||||||
|   public void testGenerateUrlLink() throws WxErrorException { |   public void testGenerateUrlLink() throws WxErrorException { | ||||||
|     String url = this.wxMaService.getLinkService().generateUrlLink(GenerateUrlLinkRequest.builder() |     String url = this.wxMaService.getLinkService().generateUrlLink(GenerateUrlLinkRequest.builder() | ||||||
|       .path("pages/tabBar/home/home") |       .path("pages/tabBar/home/home") | ||||||
|  |       .expireTime(LocalDateTime.now().plusDays(5).atZone(ZoneId.systemDefault()).toEpochSecond()) //增加有效期,此行可注释 | ||||||
|       .build()); |       .build()); | ||||||
|  |  | ||||||
|     System.out.println(url); |     System.out.println(url); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user