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

添加业务修改通知php

parent c78eb922
......@@ -63,24 +63,39 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
private AppInfoTempleteFieldService appInfoTempleteFieldService;
@Autowired
private AppVersionService appVersionService;
@Override
protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException {
//排序
/* if (!ObjectUtils.isEmpty(params.getIdList())) {
//根据idList进行排序
for (int i = 0; i < params.getIdList().size(); i++) {
Long id = params.getIdList().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);
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进行排序
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<AppEntity> appEntityList = this.find(new AppQuery().appCode(item.getAppCode()), context);
......@@ -130,11 +145,11 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
FileUtil.del(disPath);
}
//ZipUtils.unzip(new File(targetFilePath), disPath);
String fileEncode ="UTF-8";
String fileEncode = "UTF-8";
try {
fileEncode = EncodeUtil.getEncode(targetFilePath,true);
fileEncode = EncodeUtil.getEncode(targetFilePath, true);
} catch (Exception e) {
log.error("异常",e);
log.error("异常", e);
}
ZipUtil.unzip(targetFilePath, disPath, Charset.forName(fileEncode));
//更新
......@@ -164,11 +179,11 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
FileUtil.del(disPath);
}
// ZipUtils.unzip(new File(targetFilePath), disPath);
String fileEncode ="UTF-8";
String fileEncode = "UTF-8";
try {
fileEncode = EncodeUtil.getEncode(targetFilePath,true);
fileEncode = EncodeUtil.getEncode(targetFilePath, true);
} catch (Exception e) {
log.error("异常",e);
log.error("异常", e);
}
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