clearSock(); } /** * 人才购房 - 清除名额锁定 */ private function clearSock() { $list = TalentHouse::where('is_end', 2)->where('supply_time', '<=', date('Y-m-d H:i:s'))->get(); if ($list->isEmpty()) { return true; } foreach ($list as $v) { TalentHouseApply::where('house_id', $v['id'])->where('status', '<>', 2)->update(['is_sock' => 2]); $v->is_end = 1; $v->save(); } return true; } }