diff --git a/process/Task2.php b/process/Task2.php index 4437ff3..2c40273 100644 --- a/process/Task2.php +++ b/process/Task2.php @@ -6,6 +6,7 @@ use app\dao\UserPhoneLogDao; use App\Utils\API\SendCode; use app\model\UserPhone; use app\dao\UserRewardDao; +use app\model\Dictionary; use support\Log; use Workerman\Crontab\Crontab; use GuzzleHttp\Client; @@ -22,6 +23,8 @@ class Task2 new Crontab('0 */1 * * * *', function () { $start_time = time(); Rocketgo::test_login(); + //查询系统配置 是否自动删除用户 + $autodelete=Dictionary::where('key','autodelete')->first(); Log::info("查询任务开始"); // 获取账号列表 $res = Rocketgo::account_list(); @@ -44,7 +47,7 @@ class Task2 $updateData = []; foreach ($res as $v) { - if ($v['failedReason'] !== null) { + if ($v['failedReason'] !== null && $autodelete->value=='1') { SendCode::delWS($v['username']); continue; }