subMonths(3)->startOfDay()->timestamp; foreach ($uniAccount as $u) { Setting::$uniqueAccountId = \YunShop::app()->uniacid = $u->uniacid; SysMsgLog::uniacid()->where('created_at', '<', $time)->delete(); } } catch (\Exception $e) { \Log::debug('-----定时删除系统消息错误------', [$e->getMessage()]); } } }