Commit dba01bb2 authored by alex yao's avatar alex yao

feat: 知识库文档批量删除

parent c6d73798
...@@ -34,6 +34,14 @@ public interface KnowledgeRest extends BaseRest { ...@@ -34,6 +34,14 @@ public interface KnowledgeRest extends BaseRest {
*/ */
Boolean delDocument(@RequestParam Integer kdId); Boolean delDocument(@RequestParam Integer kdId);
/**
* 批量删除文档
*
* @param kdId 主键ID
* @return 是否成功
*/
Boolean batchDelDocument(@RequestBody List<Integer> kdId);
/** /**
* 重命名 * 重命名
......
...@@ -59,6 +59,16 @@ public class KnowledgeRestImpl implements KnowledgeRest { ...@@ -59,6 +59,16 @@ public class KnowledgeRestImpl implements KnowledgeRest {
return knowledgeService.delDocument(kdId); return knowledgeService.delDocument(kdId);
} }
@Override
public Boolean batchDelDocument(List<Integer> kdId) {
Assert.notEmpty(kdId);
boolean result = true;
for (Integer id : kdId) {
result = result && knowledgeService.delDocument(id);
}
return result;
}
@Override @Override
public Boolean renameDocument(Integer kdId, String rename) throws Exception { public Boolean renameDocument(Integer kdId, String rename) throws Exception {
return knowledgeService.renameDocument(kdId, rename); return knowledgeService.renameDocument(kdId, rename);
......
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