|
@@ -140,6 +140,16 @@ public class ArchiveFileServiceImpl extends BaseServiceImpl<ArchiveFileMapper, A
|
|
|
StringBuffer ids2 = new StringBuffer();
|
|
|
Map<Long, Integer> mapkey = new HashMap<>();
|
|
|
Collections.sort(listInt);
|
|
|
+
|
|
|
+ Map<Integer, String> resultMap = list.stream()
|
|
|
+ .sorted(Comparator.comparing(ArchiveFileVO::getSort)) // 按sort从小到大排序
|
|
|
+ .collect(Collectors.toMap(
|
|
|
+ ArchiveFileVO::getSort, // 键是sort字段
|
|
|
+ ArchiveFileVO::getNodeId, // 值是id字段
|
|
|
+ (existing, replacement) -> existing, // 如果有重复的key,保留第一个
|
|
|
+ LinkedHashMap::new // 使用LinkedHashMap保持顺序
|
|
|
+ ));
|
|
|
+
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
ids2.append(list.get(i).getId() + ",");
|
|
|
list.get(i).setSort(listInt.get(i));
|
|
@@ -150,6 +160,9 @@ public class ArchiveFileServiceImpl extends BaseServiceImpl<ArchiveFileMapper, A
|
|
|
list.get(i).setRectification(2);
|
|
|
}
|
|
|
}
|
|
|
+ if(resultMap.containsKey(listInt.get(i))&& !Objects.equals(resultMap.get(listInt.get(i)), list.get(i).getNodeId())){
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
// 删除oss文件
|
|
|
if (ids != null && ids.length() > 0) {
|