| | |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获取文档") |
| | | @PreAuthorize("@ss.hasPermission('ai:knowledge:query')") |
| | | public CommonResult<AiKnowledgeDocumentRespVO> getDocument(@RequestParam("id") Long id) { |
| | | return success(BeanUtils.toBean(documentService.getDocument(id), AiKnowledgeDocumentRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获取文档分页") |
| | | @PreAuthorize("@ss.hasPermission('ai:knowledge:query')") |
| | | public CommonResult<PageResult<AiKnowledgeDocumentRespVO>> getDocumentPage(@Valid AiKnowledgeDocumentPageReqVO pageReqVO) { |
| | | PageResult<AiKnowledgeDocumentDO> pageResult = documentService.getDocumentPage(pageReqVO); |
| | | return success(BeanUtils.toBean(pageResult, AiKnowledgeDocumentRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/progress") |
| | | @Operation(summary = "获取文档处理进度") |
| | | @PreAuthorize("@ss.hasPermission('ai:knowledge:query')") |
| | | public CommonResult<List<AiKnowledgeSegmentProcessRespVO>> getProcessingProgress(@RequestParam("documentIds") List<Long> documentIds) { |
| | | return success(documentService.getDocumentProcessingProgress(documentIds)); |
| | | } |