| | |
| | | ZipFile zip = Zip4jHelper.createZipFile(zipFile, pwd); |
| | | ZipParameters params = Zip4jHelper.getZipParams(true); |
| | | addMetaFiles(zip, params, list); |
| | | zip.addFolder(new File(gdbPath), params); |
| | | addAnnex(zip, params, annexMap); |
| | | if (dataMap.size() > 0) { |
| | | zip.addFolder(new File(gdbPath), params); |
| | | addAnnex(zip, params, annexMap); |
| | | } |
| | | |
| | | String dbPwd = Md5Helper.reverse(Md5Helper.generate(pwd)); |
| | | DownloadEntity de = getDownloadEntity(ue, zipFile, dbPwd); |
| | |
| | | private void queryData(Map<String, List<String>> tabs, Map<String, List<?>> dataMap, Map<String, List<AttachEntity>> annexMap) { |
| | | for (String tab : tabs.keySet()) { |
| | | try { |
| | | String entity = tab.split(StaticData.POINT)[1].replace("_", ""); |
| | | String entity = tab.toLowerCase().replace("_", "").split("\\.")[1]; |
| | | BasicMapper baseMapper = ClassHelper.getBasicMapper(entity); |
| | | if (null == baseMapper) { |
| | | continue; |
| | |
| | | * 创建查询包装器 |
| | | */ |
| | | private <T> QueryWrapper<T> createQueryWrapper(BasicMapper baseMapper, List<String> ids) { |
| | | QueryWrapper<T> wrapper = new QueryWrapper<T>(); |
| | | for (int i = 0, c = ids.size(); i < c; i++) { |
| | | ids.set(i, "'" + ids.get(i) + "'"); |
| | | } |
| | | String filter = String.format("parentid in (%s)", StringHelper.join(ids, ",")); |
| | | |
| | | QueryWrapper<T> wrapper = new QueryWrapper<T>(); |
| | | wrapper.apply(filter); |
| | | |
| | | return wrapper; |
| | | } |