|  |  |  | @ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 
			
		
	
		
			
				
					|  |  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
			
		
	
		
			
				
					|  |  |  |  | import com.hnac.gglm.bigmodel.database.service.WeaviateService; | 
			
		
	
		
			
				
					|  |  |  |  | import com.hnac.gglm.bigmodel.maintenance.constants.StoreStatus; | 
			
		
	
		
			
				
					|  |  |  |  | import com.hnac.gglm.bigmodel.maintenance.entity.KnowledgeFileFragment; | 
			
		
	
		
			
				
					|  |  |  |  | import com.hnac.gglm.bigmodel.maintenance.entity.KnowledgeFileInfo; | 
			
		
	
	
		
			
				
					|  |  |  | @ -45,6 +46,7 @@ public class KnowledgeFileInfoServiceImpl extends ServiceImpl<KnowledgeFileInfoM | 
			
		
	
		
			
				
					|  |  |  |  |     private final KnowledgeFileInfoMapper knowledgeFileInfoMapper; | 
			
		
	
		
			
				
					|  |  |  |  |     private final KnowledgeFileFragmentService fileFragmentService; | 
			
		
	
		
			
				
					|  |  |  |  |     private final IOssClient ossClient; | 
			
		
	
		
			
				
					|  |  |  |  |     private final WeaviateService weaviateService; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @Value("${gglm.url}") | 
			
		
	
		
			
				
					|  |  |  |  |     private String interactionUrl; | 
			
		
	
	
		
			
				
					|  |  |  | @ -119,7 +121,16 @@ public class KnowledgeFileInfoServiceImpl extends ServiceImpl<KnowledgeFileInfoM | 
			
		
	
		
			
				
					|  |  |  |  |     public Boolean removeRecursive(List<Long> idsList) { | 
			
		
	
		
			
				
					|  |  |  |  |         Boolean result = removeByIds(idsList); | 
			
		
	
		
			
				
					|  |  |  |  |         if (result) { | 
			
		
	
		
			
				
					|  |  |  |  |             fileFragmentService.remove(Wrappers.<KnowledgeFileFragment>lambdaQuery().in(KnowledgeFileFragment::getDocId, idsList)); | 
			
		
	
		
			
				
					|  |  |  |  |             try { | 
			
		
	
		
			
				
					|  |  |  |  |                 fileFragmentService.remove(Wrappers.<KnowledgeFileFragment>lambdaQuery().in(KnowledgeFileFragment::getDocId, idsList)); | 
			
		
	
		
			
				
					|  |  |  |  |                 for (Long id : idsList) { | 
			
		
	
		
			
				
					|  |  |  |  |                     Map<String, String> condition = new HashMap<>(); | 
			
		
	
		
			
				
					|  |  |  |  |                     condition.put("doc_id", id.toString()); | 
			
		
	
		
			
				
					|  |  |  |  |                     weaviateService.deleteCondition(VECTOR_DATABASE_NAME, condition); | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             } catch (Exception e) { | 
			
		
	
		
			
				
					|  |  |  |  |                 log.error("删除知识库文件文件出错", e); | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         return result; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |