|
@@ -471,14 +471,6 @@ public class ClaudeCodeController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//======================================================================时间倍率===============================================================================
|
|
//======================================================================时间倍率===============================================================================
|
|
|
- /**
|
|
|
|
|
- * 获取当前时间的积分倍率配置信息
|
|
|
|
|
- */
|
|
|
|
|
- @GetMapping("/timeRate/current")
|
|
|
|
|
- public Result<TimeRateCurrentResp> getCurrentTimeRate() {
|
|
|
|
|
- TimeRateCurrentResp resp = claudeCodeService.getCurrentTimeRate();
|
|
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(resp);
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取系统中所有的时间倍率配置列表(包括已启用和已禁用的配置)
|
|
* 获取系统中所有的时间倍率配置列表(包括已启用和已禁用的配置)
|
|
@@ -492,42 +484,6 @@ public class ClaudeCodeController {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(resp);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(resp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 创建新的时间倍率配置。系统支持跨天配置(如23点到6点)
|
|
|
|
|
- */
|
|
|
|
|
- @PostMapping("/timeRate/configs")
|
|
|
|
|
- public Result<TimeRateConfigResp> createConfig(@RequestBody @Validated TimeRateConfigReq req) {
|
|
|
|
|
- TimeRateConfigResp resp = claudeCodeService.createConfig(req);
|
|
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(resp);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 更新指定ID的时间倍率配置
|
|
|
|
|
- */
|
|
|
|
|
- @PutMapping("/timeRate/configs/{id}")
|
|
|
|
|
- public Result<TimeRateConfigResp> updateConfig(@PathVariable Long id, @RequestBody @Validated TimeRateConfigReq req) {
|
|
|
|
|
- TimeRateConfigResp resp = claudeCodeService.updateConfig(id, req);
|
|
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(resp);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 删除指定ID的时间倍率配置。删除后该时间段将使用默认倍率1.0
|
|
|
|
|
- */
|
|
|
|
|
- @DeleteMapping("/timeRate/configs/{id}")
|
|
|
|
|
- public Result<String> deleteConfig(@PathVariable Long id) {
|
|
|
|
|
- claudeCodeService.deleteConfig(id);
|
|
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult("Time multiplier config deleted successfully");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 将指定用户的积分重置为满积分状态(used_credits设为0)
|
|
|
|
|
- */
|
|
|
|
|
- @PostMapping("/users/{userId}/credits/reset")
|
|
|
|
|
- public Result<CreditResetResp> resetUserCredits(@PathVariable Long userId, @RequestBody(required = false) CreditResetReq req) throws Exception {
|
|
|
|
|
- CreditResetResp resp = claudeCodeService.resetUserCredits(userId, req);
|
|
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(resp);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* claude code模型倍率
|
|
* claude code模型倍率
|
|
|
*/
|
|
*/
|