Commit c67ec4eb authored by 赵啸非's avatar 赵啸非

修改同步事项

parent 9417d5a6
......@@ -111,42 +111,8 @@ public class AppServiceImpl extends AbstractCRUDCacheServiceImpl<AppDao, AppEnti
} else {
item.setAppIconUrl(item.getAppIconPath());
}
};
super.findAfter(params, pageInfo, context, list);
}
private void sortAppByIdList(AppEntity params, List<AppEntity> list) {
if (!ObjectUtils.isEmpty(params.getIdList())) {
log.info("请求的排序id列表:{}", JSON.toJSONString(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);
}
}
super.findAfter(params, pageInfo, context, list);
}
private void checkDeviceBlackApp(AppEntity params, List<AppEntity> list) {
......@@ -453,7 +419,7 @@ public class AppServiceImpl extends AbstractCRUDCacheServiceImpl<AppDao, AppEnti
versionEntity.initAttrValue();
versionEntity.setAppId(entity.getId());
versionEntity.setAppName(entity.getAppName());
versionEntity.setVersion(++versionNum);
versionEntity.setVersion(versionNum);
versionEntity.setNotes(entity.getNotes());
versionEntity.setFileName(entity.getFileName());
versionEntity.setFilePath(entity.getFilePath());
......
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