|
|
@@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
+ * server/codex
|
|
|
* 项目名: yhlxj11111111
|
|
|
* 文件名: CodexController
|
|
|
* 创建者: Claude
|
|
|
@@ -58,22 +59,6 @@ public class CodexController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(response);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 获取系统OpenAI指标统计
|
|
|
- * period 时间周期(today/7d/30d/all)
|
|
|
- * metric 指标类型(usage/cost/requests/errors/all)
|
|
|
- */
|
|
|
- @GetMapping("/api/openai/system/metrics")
|
|
|
- public ClaudeCodeResp getSystemMetrics(@RequestParam(defaultValue = "today") String period,
|
|
|
- @RequestParam(defaultValue = "all") String metric) {
|
|
|
- // 系统级指标查询,通常需要管理员权限
|
|
|
- // 这里可以添加权限验证逻辑
|
|
|
- long currentUserId = StpUserUtil.getLoginIdAsLong();
|
|
|
-
|
|
|
- ClaudeCodeResp response = codexService.getSystemMetrics(period, metric);
|
|
|
- return response;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 获取用户密钥列表
|
|
|
*/
|
|
|
@@ -106,17 +91,6 @@ public class CodexController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(response);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 获取用户仪表盘数据
|
|
|
- * 返回用户的OpenAI使用概览、限额信息、最近活动等综合数据
|
|
|
- */
|
|
|
- @GetMapping("/api/openai/users/dashboard")
|
|
|
- public ClaudeCodeResp getUserDashboard() {
|
|
|
- long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
- ClaudeCodeResp response = codexService.getUserDashboard(userId);
|
|
|
- return response;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* 用户OpenAI控制台数据 (Java系统专用接口)
|
|
|
*/
|