feat: Introduce API for owner account import, validation, account ID management, and ban checks.

This commit is contained in:
2026-01-31 03:50:55 +08:00
parent 05580bd025
commit 2f01842376
2 changed files with 82 additions and 51 deletions

View File

@@ -134,8 +134,8 @@ func runScheduledBanCheck() {
logger.Info(fmt.Sprintf("定期封禁检查: 发现 %d 个需要检查的母号", len(owners)), "", "ban-check")
// 执行检查
go runBanCheckTask(owners, 2)
// 执行检查(并发数 20
go runBanCheckTask(owners, 20)
}
// HandleBanCheckSettings 获取/设置封禁检查配置
@@ -231,14 +231,11 @@ func HandleManualBanCheck(w http.ResponseWriter, r *http.Request) {
}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
// 允许空 body
req.Concurrency = 2
req.Concurrency = 20
}
if req.Concurrency <= 0 {
req.Concurrency = 2
}
if req.Concurrency > 5 {
req.Concurrency = 5
req.Concurrency = 20
}
var owners []database.TeamOwner