Commit 6dcdba3c authored by 赵啸非's avatar 赵啸非

添加业务修改通知php

parent c78eb922
...@@ -63,13 +63,25 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -63,13 +63,25 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
private AppInfoTempleteFieldService appInfoTempleteFieldService; private AppInfoTempleteFieldService appInfoTempleteFieldService;
@Autowired @Autowired
private AppVersionService appVersionService; private AppVersionService appVersionService;
@Override @Override
protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException { protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException {
//排序 //排序
/* if (!ObjectUtils.isEmpty(params.getIdList())) { if (!ObjectUtils.isEmpty(params.getIdList())) {
try {
//去除idlist中不存在的
Set<Long> idSet = list.stream().map(item -> item.getId()).collect(Collectors.toSet());
List<Long> idList = params.getIdList();
Iterator<Long> ite = idList.iterator();
while (ite.hasNext()) {
Long next = ite.next();
if (!idSet.contains(next)) {
ite.remove();
}
}
//根据idList进行排序 //根据idList进行排序
for (int i = 0; i < params.getIdList().size(); i++) { for (int i = 0; i < idList.size(); i++) {
Long id = params.getIdList().get(i); Long id = idList.get(i);
for (int j = 0; j < list.size(); j++) { for (int j = 0; j < list.size(); j++) {
if (id.equals(list.get(j).getId())) { if (id.equals(list.get(j).getId())) {
//判断位置是否一直 //判断位置是否一直
...@@ -80,7 +92,10 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -80,7 +92,10 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
} }
} }
} }
}*/ } catch (Exception e) {
log.error("排序异常!", e);
}
}
//统计站点 //统计站点
list.forEach(item -> { list.forEach(item -> {
List<AppEntity> appEntityList = this.find(new AppQuery().appCode(item.getAppCode()), context); List<AppEntity> appEntityList = this.find(new AppQuery().appCode(item.getAppCode()), context);
...@@ -130,11 +145,11 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -130,11 +145,11 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
FileUtil.del(disPath); FileUtil.del(disPath);
} }
//ZipUtils.unzip(new File(targetFilePath), disPath); //ZipUtils.unzip(new File(targetFilePath), disPath);
String fileEncode ="UTF-8"; String fileEncode = "UTF-8";
try { try {
fileEncode = EncodeUtil.getEncode(targetFilePath,true); fileEncode = EncodeUtil.getEncode(targetFilePath, true);
} catch (Exception e) { } catch (Exception e) {
log.error("异常",e); log.error("异常", e);
} }
ZipUtil.unzip(targetFilePath, disPath, Charset.forName(fileEncode)); ZipUtil.unzip(targetFilePath, disPath, Charset.forName(fileEncode));
//更新 //更新
...@@ -164,11 +179,11 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -164,11 +179,11 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
FileUtil.del(disPath); FileUtil.del(disPath);
} }
// ZipUtils.unzip(new File(targetFilePath), disPath); // ZipUtils.unzip(new File(targetFilePath), disPath);
String fileEncode ="UTF-8"; String fileEncode = "UTF-8";
try { try {
fileEncode = EncodeUtil.getEncode(targetFilePath,true); fileEncode = EncodeUtil.getEncode(targetFilePath, true);
} catch (Exception e) { } catch (Exception e) {
log.error("异常",e); log.error("异常", e);
} }
ZipUtil.unzip(targetFilePath, disPath, Charset.forName(fileEncode)); ZipUtil.unzip(targetFilePath, disPath, Charset.forName(fileEncode));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment