Преглед на файлове

增加文件下载配置

tags/24080901
WendyYang преди 10 месеца
родител
ревизия
7c9983931d
променени са 3 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/external/MhFileClient.java
  2. +3
    -1
      hz-pm-api/src/main/resources/application-dev.yml
  3. +5
    -1
      hz-pm-api/src/main/resources/application-prod.yml

+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/external/MhFileClient.java Целия файл

@@ -39,7 +39,7 @@ public class MhFileClient {
private String fileDetailUrl;

public void download(String fileId, HttpServletResponse response) {
String fileUrl = fileDownUrl + fileId;
String fileUrl = fileDownUrl + "/" + fileId;
try (ServletOutputStream stream = response.getOutputStream()) {
long size = HttpUtil.download(fileUrl, stream, true);
log.info("下载文件:{},大小为:{}", fileId, size);


+ 3
- 1
hz-pm-api/src/main/resources/application-dev.yml Целия файл

@@ -251,4 +251,6 @@ mh:
# client-id: ningda-74a5e5da-3bc3-414a-b9e6-004b7d87e310
# client-secret: ningda-df746ce4-0c79-4242-b3c7-90ff8630c9742c6727cd-3ae7-48ae-87ad-2b39188ebabd
# api-host: http://10.54.38.13:8081/mh-gateway/auth-single
expert-qr-code-url: https://jiema.wwei.cn/uploads/2023/12/28/658d7a3f15f06.jpg
expert-qr-code-url: https://jiema.wwei.cn/uploads/2023/12/28/658d7a3f15f06.jpg
file:
detail-url: https://weixin.hzszxc.hzswb.cn:8443/mh-gateway/oss/ossfile/getFileInfoList

+ 5
- 1
hz-pm-api/src/main/resources/application-prod.yml Целия файл

@@ -247,4 +247,8 @@ mh:
sso:
client-id: ningda-74a5e5da-3bc3-414a-b9e6-004b7d87e310
client-secret: ningda-df746ce4-0c79-4242-b3c7-90ff8630c9742c6727cd-3ae7-48ae-87ad-2b39188ebabd
api-host: http://10.54.38.13:8081/mh-gateway/auth-single
api-host: http://10.54.38.13:8081/mh-gateway/auth-single
expert-qr-code-url: http://10.54.38.13:8081/mh-gateway/problem/expert/getExpertQrCode
file:
detail-url: http://10.54.38.13:8081/mh-gateway/oss/ossfile/getFileInfoList
down-url: http://10.54.38.13:8081/mh-gateway/oss/oss/downloadFileNotLogin

Loading…
Отказ
Запис