feat: 优化 Task2 类中的用户状态处理逻辑,简化代码结构
This commit is contained in:
parent
106194ea95
commit
234bc63dd0
|
@ -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 小时的积分
|
||||
|
|
Loading…
Reference in New Issue