@Test public void testGetJssdkFile() throws WxErrorException { File file = this.wxService.getMediaService().getJssdkFile("...."); assertThat(file).isNotNull(); System.out.println(file); }
@Override public File getJssdkFile(String mediaId) throws WxErrorException { return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), JSSDK_MEDIA_GET_URL, "media_id=" + mediaId); }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File getJssdkFile(String mediaId) throws WxErrorException { return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), JSSDK_MEDIA_GET_URL, "media_id=" + mediaId); } }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File getJssdkFile(String mediaId) throws WxErrorException { return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), JSSDK_MEDIA_GET_URL, "media_id=" + mediaId); } WxCpMediaServiceImpl(WxCpService mainService); }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File getJssdkFile(String mediaId) throws WxErrorException { return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), JSSDK_MEDIA_GET_URL, "media_id=" + mediaId); } WxCpMediaServiceImpl(WxCpService mainService); @Override WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream); @Override WxMediaUploadResult upload(String mediaType, File file); @Override File download(String mediaId); @Override File getJssdkFile(String mediaId); @Override String uploadImg(File file); }
WxCpMediaServiceImpl implements WxCpMediaService { @Override public File getJssdkFile(String mediaId) throws WxErrorException { return this.mainService.execute( BaseMediaDownloadRequestExecutor.create(this.mainService.getRequestHttp(), this.mainService.getWxCpConfigStorage().getTmpDirFile()), JSSDK_MEDIA_GET_URL, "media_id=" + mediaId); } WxCpMediaServiceImpl(WxCpService mainService); @Override WxMediaUploadResult upload(String mediaType, String fileType, InputStream inputStream); @Override WxMediaUploadResult upload(String mediaType, File file); @Override File download(String mediaId); @Override File getJssdkFile(String mediaId); @Override String uploadImg(File file);  }