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

添加业务修改通知php

parent c78eb922
...@@ -63,24 +63,39 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -63,24 +63,39 @@ 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())) {
//根据idList进行排序 try {
for (int i = 0; i < params.getIdList().size(); i++) { //去除idlist中不存在的
Long id = params.getIdList().get(i); Set<Long> idSet = list.stream().map(item -> item.getId()).collect(Collectors.toSet());
for (int j = 0; j < list.size(); j++) { List<Long> idList = params.getIdList();
if (id.equals(list.get(j).getId())) { Iterator<Long> ite = idList.iterator();
//判断位置是否一直 while (ite.hasNext()) {
if (i != j) { Long next = ite.next();
//交换 if (!idSet.contains(next)) {
Collections.swap(list, i, j); ite.remove();
}
}
//根据idList进行排序
for (int i = 0; i < idList.size(); i++) {
Long id = idList.get(i);
for (int j = 0; j < list.size(); j++) {
if (id.equals(list.get(j).getId())) {
//判断位置是否一直
if (i != j) {
//交换
Collections.swap(list, i, j);
}
} }
} }
} }
} 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