From 1295c58e706a74ad68d3c2c84b2bdde779507fb5 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期一, 23 十月 2023 21:15:44 +0800 Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server --- ycl-platform/src/main/java/com/ycl/controller/dingding/DingController.java | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ycl-platform/src/main/java/com/ycl/controller/dingding/DingController.java b/ycl-platform/src/main/java/com/ycl/controller/dingding/DingController.java index 97c0a32..ba9b287 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/dingding/DingController.java +++ b/ycl-platform/src/main/java/com/ycl/controller/dingding/DingController.java @@ -187,7 +187,7 @@ return CommonResult.success(bookRemarkService.updateRemark(user, userId, remark)); } - @ApiOperation(value = "閫氳褰曢�掑綊") + @ApiOperation(value = "鑾峰彇瑙嗛") @GetMapping("/getVideo/{mediaId}") public CommonResult<String> getVideo(@PathVariable String mediaId) { String accessToken = getToken(); @@ -219,23 +219,23 @@ String api = "/media/download"; GetClient getClient = executableClient.newGetClient(api); //璁剧疆鍙傛暟 - getClient.addParameter("access_token", "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ7XCJ1c2VySWRcIjozLFwidXNlcm5hbWVcIjpcImFkbWluXCJ9IiwiY3JlYXRlZCI6MTY5NDY2NDE5MjA4MiwiZXhwIjoxNjk1MjY4OTkyfQ.fSc0sEfLhD3pgrguYZ0Q4Tr-0wjZNwY2xnGsaGzN1d4oXMnEoX9MJmDQcwEiZ1uLKZbGQCqUtJciAIvINmNq9w "); + getClient.addParameter("access_token", access_token); getClient.addParameter("media_id", media_id); response = getClient.getB(); HttpEntity entity = response.getEntity(); InputStream is = entity.getContent(); - File voice = new File("D:/IMG_4401.MOV"); - OutputStream fos = new FileOutputStream(voice); - int cache = 10 * 1024; - byte[] buffer = new byte[cache]; - int ch = 0; - while ((ch = is.read(buffer)) != -1) { - fos.write(buffer, 0, ch); - } - is.close(); - fos.flush(); - fos.close(); +// File voice = new File("D:/IMG_4401.MOV"); +// OutputStream fos = new FileOutputStream(voice); +// int cache = 10 * 1024; +// byte[] buffer = new byte[cache]; +// int ch = 0; +// while ((ch = is.read(buffer)) != -1) { +// fos.write(buffer, 0, ch); +// } +// is.close(); +// fos.flush(); +// fos.close(); DateTimeFormatter dtf2 = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); String strDate2 = dtf2.format(LocalDateTime.now()); -- Gitblit v1.8.0