|
|
@@ -115,12 +115,20 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void getUserPointsStatisticsData(long userId) throws Exception {
|
|
|
+ public void getUserPointsStatisticsData(Long userId) throws Exception {
|
|
|
String url = String.format(CLAUDE_CODE_API_PREFIX + "api/users/%s/usage/stats", userId);
|
|
|
String responseBody = executeClaudeCodeGetApi(url);
|
|
|
ClaudeCodeResp claudeCodeResp = Jsons.parseObject(responseBody, ClaudeCodeResp.class);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public ClaudeCodeResp getUserDashboard(Long userId) throws Exception {
|
|
|
+ String url = String.format(CLAUDE_CODE_API_PREFIX + "api/users/%s/dashboard", userId);
|
|
|
+ String responseBody = executeClaudeCodeGetApi(url);
|
|
|
+ ClaudeCodeResp claudeCodeResp = Jsons.parseObject(responseBody, ClaudeCodeResp.class);
|
|
|
+ return claudeCodeResp;
|
|
|
+ }
|
|
|
+
|
|
|
public void createOrUpdateClaudeCodeUserPackage(Long userId, String planName, Integer codePoints, Integer codeCreditRecovery, Date expiryTime) throws Exception {
|
|
|
Map<String, Object> parmas = new HashMap<>();
|
|
|
parmas.put("plan_name", planName.replaceAll(";", ""));
|