管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-01-12 d1d61f6f9ae0c992e4368e7df72dc9ad8ab57e40
1
已修改2个文件
50 ■■■■■ 文件已修改
data/update.sql 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/data/UploadService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data/update.sql
@@ -108,26 +108,46 @@
select * from lf.sys_fme_log;
select * from lf.sys_dep order by id
select * from lf.sys_user
select * from lf.sys_meta where guid='6b59075f0ff6611b815616bedc8b6af3'
select * from lf.sys_menu where cn_name='数据管理'
with recursive rs as(
    select a.* from lf.sys_menu a where a.id = 2
    select a.* from lf.sys_menu a where a.id = 64
union
    select a.* from lf.sys_menu a, rs b where a.pid = b.id
)
select * FROM rs where rs.id in (
    select distinct e.id
    select *
      from lf.sys_user a inner join lf.sys_role_user b on a.id = b.userid
      inner join lf.sys_role_menu_auth c on b.roleid = c.roleid
      inner join lf.sys_menu_auth d on c.menu_auth_id = d.id
      inner join lf.sys_menu e on d.menuid = e.id
      inner join lf.sys_auth f on d.authid = f.id
      where a.uid = 'kc')
      where a.uid = 'admin')
order by order_num;
src/main/java/com/lf/server/service/data/UploadService.java
@@ -219,24 +219,23 @@
        MetaEntity old = metaService.selectByGuid(mf.getGuid());
        if (null != old) {
            mf.setMsg("文件已存在");
            mf.setPath(old.getPath());
            file.delete();
            return 0;
        }
        String uploadPath = pathHelper.getUploadFullPath();
        String targetPath = uploadPath + File.separator + mf.getGuid() + mf.getExtName();
        String subPath = FileHelper.getRelativePath(targetPath);
        File newFile = new File(targetPath);
        if (newFile.exists()) {
            mf.setMsg("文件已存在");
            mf.setPath(subPath);
            file.delete();
            return 0;
        }
        file.renameTo(newFile);
        String subPath = FileHelper.getRelativePath(targetPath);
        mf.setPath(subPath);
        return 1;
@@ -290,17 +289,18 @@
        MetaEntity old = metaService.selectByGuid(mf.getGuid());
        if (null != old) {
            mf.setMsg("文件已存在");
            mf.setPath(old.getPath());
            FileHelper.deleteFiles(file);
            return;
        }
        String uploadPath = pathHelper.getUploadFullPath();
        String targetPath = uploadPath + File.separator + mf.getGuid() + mf.getExtName();
        String subPath = FileHelper.getRelativePath(targetPath);
        File newFile = new File(targetPath);
        if (newFile.exists() && newFile.isDirectory()) {
            mf.setMsg("文件已存在");
            mf.setPath(subPath);
            FileHelper.deleteFiles(file);
            return;
        }
@@ -312,11 +312,9 @@
        }
        for (File f : files) {
            String subPath = targetPath + File.separator + FileHelper.getFileName(f.getPath());
            f.renameTo(new File(subPath));
            String subFile = targetPath + File.separator + FileHelper.getFileName(f.getPath());
            f.renameTo(new File(subFile));
        }
        String subPath = FileHelper.getRelativePath(targetPath);
        mf.setPath(subPath);
    }