2], null, '*', null, true); if (!empty($list)) { foreach ($list as $c) { $ghsId = $c->ghsId ?? 0; $ghs = GhsClass::getById($ghsId, true); if (!empty($ghs)) { $ghs->black = 2; $ghs->save(); echo $ghs->name . " id:{$ghs->id} 已经黑了\n"; } } } } }