知识库 下拉菜单
This commit is contained in:
parent
9685fb9745
commit
23bc3d3190
@ -77,6 +77,14 @@ public class KnowledgeBaseController {
|
||||
return success(BeanUtils.toBean(pageResult, KnowledgeBaseRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得知识库分页")
|
||||
@PreAuthorize("@ss.hasPermission('llm:knowledge-base:query')")
|
||||
public CommonResult<List<KnowledgeBaseRespVO>> getKnowledgeBaseList() {
|
||||
List<KnowledgeBaseDO> list = knowledgeBaseService.getKnowledgeBaseList();
|
||||
return success(BeanUtils.toBean(list, KnowledgeBaseRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出知识库 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('llm:knowledge-base:export')")
|
||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.llm.controller.admin.knowledgebase.vo.KnowledgeBa
|
||||
import cn.iocoder.yudao.module.llm.dal.dataobject.knowledgebase.KnowledgeBaseDO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 知识库 Service 接口
|
||||
@ -52,4 +53,5 @@ public interface KnowledgeBaseService {
|
||||
*/
|
||||
PageResult<KnowledgeBaseDO> getKnowledgeBasePage(KnowledgeBasePageReqVO pageReqVO);
|
||||
|
||||
List<KnowledgeBaseDO> getKnowledgeBaseList();
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU
|
||||
import static cn.iocoder.yudao.module.llm.enums.ErrorCodeConstants.KNOWLEDGE_BASE_NOT_EXISTS;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 知识库 Service 实现类
|
||||
@ -68,4 +69,9 @@ public class KnowledgeBaseServiceImpl implements KnowledgeBaseService {
|
||||
return knowledgeBaseMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KnowledgeBaseDO> getKnowledgeBaseList() {
|
||||
return knowledgeBaseMapper.selectList();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user