feat: Implement ChatGPT account registration flow and establish core backend API infrastructure with logging utilities.

This commit is contained in:
2026-02-03 03:22:43 +08:00
parent b014226074
commit cf25845a0b
8 changed files with 36 additions and 14 deletions

View File

@@ -83,9 +83,9 @@ func HandleUploadValidate(w http.ResponseWriter, r *http.Request) {
}
// 并发验证账号并获取 account_id只保留 team 账号)
logger.Info(fmt.Sprintf("开始验证账号: 共 %d 个,只导入 plan 为 team 的账号", len(owners)), "", "upload")
logger.Status(fmt.Sprintf("验证账号: 共 %d 个,只导入 plan 为 team 的账号", len(owners)), "", "upload")
validOwners, teamCount, nonTeamCount, failCount := validateAndFetchAccountIDs(owners, 20)
logger.Info(fmt.Sprintf("验证完成: team=%d, 非team=%d, 失败=%d", teamCount, nonTeamCount, failCount), "", "upload")
logger.Success(fmt.Sprintf("验证完成: team=%d, 非team=%d, 失败=%d", teamCount, nonTeamCount, failCount), "", "upload")
if len(validOwners) == 0 {
Error(w, http.StatusBadRequest, fmt.Sprintf("没有有效的 team 账号(共 %d 个非team: %d失败: %d", len(owners), nonTeamCount, failCount))
@@ -141,7 +141,7 @@ func HandleRefetchAccountIDs(w http.ResponseWriter, r *http.Request) {
return
}
logger.Info(fmt.Sprintf("开始重新获取 account_id: 共 %d 个", len(owners)), "", "upload")
logger.Status(fmt.Sprintf("重新获取 account_id: 共 %d 个", len(owners)), "", "upload")
// 并发获取 account_id
var wg sync.WaitGroup