| | |
| | | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获取 API 密钥") |
| | | @PreAuthorize("@ss.hasPermission('ai:api-key:query')") |
| | | public CommonResult<AiApiKeyRespVO> getApiKey(@RequestParam("id") Long id) { |
| | | return success(BeanUtils.toBean(apiKeyService.getApiKey(id), AiApiKeyRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获取 API 密钥分页") |
| | | @PreAuthorize("@ss.hasPermission('ai:api-key:query')") |
| | | public CommonResult<PageResult<AiApiKeyRespVO>> getApiKeyPage(@Valid AiApiKeyPageReqVO pageReqVO) { |
| | | PageResult<AiApiKeyDO> pageResult = apiKeyService.getApiKeyPage(pageReqVO); |
| | | return success(BeanUtils.toBean(pageResult, AiApiKeyRespVO.class)); |