feat: 实现账户多分组调度功能

- 添加账户分组管理功能,支持创建、编辑、删除分组
- 实现基于分组的账户调度逻辑
- 添加分组权重和优先级支持
- 提供测试脚本验证多分组调度功能
- 修复代码格式化问题(统一使用LF换行符)

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
sczheng189
2025-08-25 18:58:08 +08:00
parent 81ad8a787f
commit e69ab2161d
7 changed files with 567 additions and 104 deletions

View File

@@ -609,6 +609,13 @@ class ClaudeAccountService {
// 🗑️ 删除Claude账户
async deleteAccount(accountId) {
try {
// 首先从所有分组中移除此账户
const accountGroupService = require('./accountGroupService')
const groups = await accountGroupService.getAccountGroup(accountId)
for (const group of groups) {
await accountGroupService.removeAccountFromGroup(accountId, group.id)
}
const result = await redis.deleteClaudeAccount(accountId)
if (result === 0) {