lizijie
2022-04-27 95e75800974a1be7ac19717e14077222490f848b
screen-api/src/main/java/com/moral/api/controller/ChartController.java
@@ -259,9 +259,9 @@
        String path = applicationHome.getSource().getParentFile().toString() + "/static/tsv";
        //File file = File.createTempFile("test",".tsv");
        if (!new File(path).exists()){
        /*if (!new File(path).exists()){
            new File(path).mkdir();
        }
        }*/
        File file = null;
        File dir = new File(path);
        file = File.createTempFile("honeycombDiagram",".tsv",dir);
@@ -290,11 +290,11 @@
        ow.flush();
        ow.close();
        String localAddr = httpServletRequest.getLocalAddr();
        int serverPort = httpServletRequest.getServerPort();
        /*String localAddr = httpServletRequest.getLocalAddr();
        int serverPort = httpServletRequest.getServerPort();*/
        Map<String,Object> res = new HashMap<>();
        res.put("path","http://"+localAddr +":"+ serverPort+"/static/tsv/"+file.getName());
        res.put("path","http://47.99.64.149:8081"+"/static/tsv/"+file.getName());
        return ResultMessage.ok(res);
    }