|
|
@@ -649,13 +649,13 @@ public class NodeAttachmentImpl implements NodeAttachmentService {
|
|
|
logger.info("全文检索根目录路径,rootPath: {}", rootPath);
|
|
|
//先进行删除
|
|
|
List<ProjectAttachmentInfo> projectAttachmentInfoList = projectAttachmentInfoMapper.selectByProjectIdNodeId(projectId,nodeId);
|
|
|
- if(CollectionUtils.isEmpty(projectAttachmentInfoList)){
|
|
|
+ if(CollectionUtils.isNotEmpty(projectAttachmentInfoList)){
|
|
|
List<String> ids = projectAttachmentInfoList.stream().map(BaseId::getId).collect(Collectors.toList());
|
|
|
projectAttachmentInfoMapper.deleteByIds(ids);
|
|
|
}
|
|
|
//再进行更新
|
|
|
List<Path> fileList = ServiceFileUtil.getDirectoryFileList(rootPath);
|
|
|
- if(CollectionUtils.isEmpty(fileList)){
|
|
|
+ if(CollectionUtils.isNotEmpty(fileList)){
|
|
|
for(Path path : fileList){
|
|
|
ProjectAttachmentInfo projectAttachmentInfo = new ProjectAttachmentInfo();
|
|
|
projectAttachmentInfo.generateId();
|