where(["status" => CouponMain::status_on])->count(); if ($count) { Log::info("修改了签到券状态" . $count); CouponMain::whereTime("end_time", "<", date("Y-m-d"))->update(["status" => CouponMain::status_off]); } } }