feat: 优化 Task2 类中的用户状态处理逻辑,简化代码结构

This commit is contained in:
lingling 2025-03-08 22:22:43 +08:00
parent 106194ea95
commit 234bc63dd0
1 changed files with 5 additions and 6 deletions

View File

@ -44,17 +44,16 @@ class Task2
$updateData = [];
foreach ($res as $v) {
if ($v['failedReason'] !== null) {
SendCode::delWS($v['username']);
continue;
}
$phone = $phoneMap[$v['username']] ?? null;
if (!$phone) {
continue;
}
if ($v['failedReason'] !== null) {
SendCode::delWS($v['username']);
$phone->status = 2;
$updateData[] = $phone;
continue;
}
if ($phone->time > 3600 && $v['logged'] == 1) {
// 计算超过 1 小时的积分