管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-27 a5525cba9bfea2bc95f542fdd7519b8f94344555
src/main/java/com/lf/server/helper/PathHelper.java
@@ -27,7 +27,7 @@
    private static int sharePath = 1;
    private final static double D92 = 92;
    private final static double D90 = 90;
    private final static Log log = LogFactory.getLog(PathHelper.class);
@@ -119,10 +119,10 @@
    /**
     * 获取临时路径
     */
    public String getTempPath() {
        String tempName = FileHelper.getTempPath();
    public String getTempPath(int id) {
        String tempName = StringHelper.YMD__FORMAT.format(new Date());
        String tempPath = config.getTempPath();
        String path = tempPath + File.separator + tempName;
        String path = tempPath + File.separator + tempName + id;
        File file = new File(path);
        if (!file.exists() && !file.isDirectory()) {
@@ -130,7 +130,7 @@
        }
        double ran = Math.random() * 99;
        if (ran > D92) {
        if (ran > D90) {
            deleteOldPath(tempPath);
        }
@@ -154,7 +154,7 @@
                deleteFiles(f);
            }
        } catch (Exception ex) {
            log.error(ex.getMessage() + ex.getStackTrace() + "\n");
            log.error(ex.getMessage(), ex);
        }
    }