管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-04-27 ab592df85b32313685510217a79d8940f2022351
1
已修改4个文件
51 ■■■■ 文件已修改
data/db_cx.sql 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/config/PropertiesConfig.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/helper/PathHelper.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/db_cx.sql
@@ -17,14 +17,12 @@
select * from lf.sys_download order by id desc limit 20; --downid
select * from lf.sys_apply order by id desc;
select * from lf.sys_flow order by id desc;
select * from lf.sys_meta order by id desc;
select * from lf.sys_meta order by id desc limit 100;
select * from lf.sys_layer order by id desc;
select * from lf.sys_fme_log order by id desc;
select * from lf.sys_pub_down order by id desc;
select * from public.coal2000 order by gid limit 20;
select * from lf.sys_dir where pid = 0 order by id;
src/main/java/com/lf/server/config/PropertiesConfig.java
@@ -16,9 +16,6 @@
    @Value("${sys.path.upload}")
    private String uploadPath;
    @Value("${sys.path.share}")
    private String sharePath;
    @Value("${sys.path.temp}")
    private String tempPath;
@@ -37,10 +34,6 @@
    public String getUploadPath() {
        return uploadPath;
    }
    public String getSharePath() {
        return sharePath;
    }
    public String getTempPath() {
src/main/java/com/lf/server/helper/PathHelper.java
@@ -23,9 +23,7 @@
    private static int uploadPath = 1;
    private static int sharePath = 1;
    private final static double D85 = 85;
    private final static double D80 = 80;
    private final static Log log = LogFactory.getLog(PathHelper.class);
@@ -41,17 +39,12 @@
        return uploadPath;
    }
    public static int getSharePath() {
        return sharePath;
    }
    /**
     * 初始化
     */
    public void init() {
        downloadPath = getSubPath(config.getDownloadPath(), downloadPath);
        uploadPath = getSubPath(config.getUploadPath(), uploadPath);
        sharePath = getSubPath(config.getSharePath(), sharePath);
    }
    private static int getSubPath(String parentPath, int subPath) {
@@ -89,15 +82,6 @@
        uploadPath = getSubPath(config.getUploadPath(), uploadPath);
        return config.getUploadPath() + File.separator + uploadPath;
    }
    /**
     * 获取共享完整目录
     */
    public String getShareFullPath() {
        sharePath = getSubPath(config.getSharePath(), sharePath);
        return config.getSharePath() + File.separator + sharePath;
    }
    /**
@@ -158,7 +142,7 @@
    public void deleteOldPath(String tempPath) {
        try {
            double ran = Math.random() * 99;
            if (ran < D85) {
            if (ran < D80) {
                return;
            }
@@ -166,12 +150,14 @@
            String str = StringHelper.YMD2_FORMAT.format(new Date());
            File[] files = file.listFiles();
            for (File f : files) {
                if (f.getPath().contains(str)) {
                    continue;
                }
            if (null != files) {
                for (File f : files) {
                    if (f.getPath().contains(str)) {
                        continue;
                    }
                FileHelper.deleteFiles(f);
                    FileHelper.deleteFiles(f);
                }
            }
        } catch (Exception ex) {
            log.error(ex.getMessage(), ex);
src/main/resources/application.yml
@@ -157,13 +157,11 @@
  # 瓦片地址
  tile_path: E:\data\99.public\soft\LFData\2d\tiles
  path:
    # 下载目录(下载文件)
    # 下载目录
    download: D:\LF\download
    # 上传目录(大数据上传)
    # 上传目录
    upload: D:\LF\upload
    # 共享目录(数据发布)
    share: D:\LF\share
    # 临时目录(临时上传文件)
    # 临时目录
    temp: D:\LF\temp
  # 上传附件表
  attachTabs: bd.b_pac_hydrogeology,bd.b_pac_frozensoil,bd.b_pac_geologic_hazard,bd.b_pac_marine_meteorological,bd.b_pac_meteorological,bs.m_equipment_nameplate,bs.m_hydraulic_protection,bs.m_marker,bs.s_explorationpoint,bs.u_sectionline