Bläddra i källkod

modify:

1. 移动端预览修改;
tags/24080901
WendyYang 5 månader sedan
förälder
incheckning
710e2fdf78
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. +4
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/external/FilePreviewClient.java

+ 4
- 1
hz-pm-api/src/main/java/com/hz/pm/api/external/FilePreviewClient.java Visa fil

@@ -1,5 +1,6 @@
package com.hz.pm.api.external;

import cn.hutool.http.useragent.UserAgentUtil;
import com.hz.pm.api.meeting.entity.config.WebProps;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.file.entity.File;
@@ -43,7 +44,9 @@ public class FilePreviewClient {

public String getFilePreviewUrl(Long fileId, HttpServletRequest request) {
String serverName = request.getServerName();
if (serverName.contains("weixin")) {
log.info("serverName:{}", serverName);
if (serverName.contains("weixin") || serverName.contains("10.54.38.13")) {
// 浙政钉访问需要转换为互联网可访问的地址
String fileDownUrl = WebProps.zzdApiUrl + FILE_DOWN_NO_AUTH_URL + fileId;
File file = fileService.getById(fileId);
return String.format(PREVIEW_PATH_FMT, mhFilePreviewPublicUrl, fileDownUrl, file.getSuffix());


Laddar…
Avbryt
Spara