| | |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获取知识库") |
| | | @PreAuthorize("@ss.hasPermission('ai:knowledge:query')") |
| | | public CommonResult<AiKnowledgeRespVO> getKnowledge(@RequestParam("id") Long id) { |
| | | return success(BeanUtils.toBean(knowledgeService.getKnowledge(id), AiKnowledgeRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获取知识库分页") |
| | | @PreAuthorize("@ss.hasPermission('ai:knowledge:query')") |
| | | public CommonResult<PageResult<AiKnowledgeRespVO>> getKnowledgePage(@Valid AiKnowledgePageReqVO pageReqVO) { |
| | | PageResult<AiKnowledgeDO> pageResult = knowledgeService.getKnowledgePage(pageReqVO); |
| | | return success(BeanUtils.toBean(pageResult, AiKnowledgeRespVO.class)); |