| | |
| | | /** |
| | | * 查询文件 |
| | | */ |
| | | @SuppressWarnings("AlibabaRemoveCommentedCode") |
| | | public List<MetaFileEntity> selectFiles(String subPath) { |
| | | public List<MetaFileEntity> selectFiles(String subPath, boolean hasMd5) { |
| | | String root = pathHelper.getConfig().getTempPath() + File.separator + subPath; |
| | | |
| | | File file = new File(root); |
| | |
| | | mf.setExtName(extName); |
| | | mf.setSizes(FileHelper.sizeToMb(f.length())); |
| | | mf.setPath(subPath + File.separator + fileName); |
| | | /*if (!StaticData.ZIP.equals(extName)) { |
| | | if (hasMd5 && !StaticData.ZIP.equals(extName)) { |
| | | mf.setGuid(FileHelper.getFileMd5(f.getPath())); |
| | | }*/ |
| | | } |
| | | |
| | | list.add(mf); |
| | | } |
| | |
| | | * 查询映射 |
| | | */ |
| | | public List<MetaFileEntity> selectMappers(UserEntity ue, String path, DirEntity dir, VerEntity ver, String epsgCode) { |
| | | List<MetaFileEntity> metas = selectFiles(path); |
| | | List<MetaFileEntity> metas = selectFiles(path, true); |
| | | if (null == metas || metas.isEmpty()) { |
| | | return null; |
| | | } |