liusheng
9 天以前 c111e3eff1191b29d2d2baf2f485a4bf3a2edc00
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -59,6 +59,12 @@
    @Value("${uploadSwitch}")
    private Integer uploadSwitch;
    @Value("${req_path}")
    private String reqPath;
    @Value("${localIP}")
    private String localIP;
    /**
     * 通用下载请求
     *
@@ -108,7 +114,10 @@
            String fileName = FileUploadUtils.uploadSort(filePath, file);
            String url = null;
            //新华医院特殊,这个视频的访问得转
            String xhPath = "http://218.108.11.22:8093/profile-api";
            String xhPath = localIP + ":" + reqPath + "/profile-api";
            if (localIP.contains("127.0.0.1") || localIP.contains("localhost")) {
                xhPath = localIP + ":8095" + "/profile";
            }
            if (uploadSwitch == 1) {
                String fn = fileName.replaceAll("/profile", "");
                url = xhPath + fn;
@@ -143,7 +152,10 @@
            convertDocToHtml(filePath + "\\" + file.getOriginalFilename(), filePath + "\\" + file.getOriginalFilename().split("\\.", 2)[0] + ".html");
            String url = null;
            String xhPath = "http://218.108.11.22:8093/profile-api";
            String xhPath = localIP + ":" + reqPath + "/profile-api";
            if (localIP.contains("127.0.0.1") || localIP.contains("localhost")) {
                xhPath = localIP + ":8095" + "/profile";
            }
            if (uploadSwitch == 1) {
                String fn = fileName.replaceAll("\\.[^.]*$", ".html").replaceAll("/profile", "");
                url = xhPath + fn;
@@ -269,7 +281,10 @@
            e.printStackTrace();
        }
        String url = null;
        String xhPath = "http://218.108.11.22:8093/profile-api";
        String xhPath = localIP + ":" + reqPath + "/profile-api";
        if (localIP.contains("127.0.0.1") || localIP.contains("localhost")) {
            xhPath = localIP + ":8095" + "/profile";
        }
        if (uploadSwitch == 1) {
            url = xhPath + "/upload/show/" + fileName.split("\\.", 2)[0] + "/" + fileName;
        } else {
@@ -313,6 +328,5 @@
        System.out.println("word转html成功");
    }
}