管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-23 574918bdc7fcf79796e6ccf63550c62349209441
src/main/java/com/lf/server/service/all/BaseUploadService.java
@@ -33,7 +33,7 @@
    /**
     * 查询文件
     */
    public List<MetaFileEntity> selectFiles(String subPath) throws IOException {
    public List<MetaFileEntity> selectFiles(String subPath, List<String> extList) throws IOException {
        String root = pathHelper.getConfig().getTempPath() + File.separator + subPath;
        File file = new File(root);
@@ -48,6 +48,13 @@
        List<MetaFileEntity> list = new ArrayList<MetaFileEntity>();
        for (File f : files) {
            String fileName = FileHelper.getFileName(f.getPath());
            if (null != extList) {
                String extName = FileHelper.getExtension(fileName);
                if (!extList.contains(extName)) {
                    continue;
                }
            }
            double sizes = FileHelper.sizeToMb(f.length());
            String filePath = subPath + File.separator + fileName;