expiredList(); $needAcceptList = OrderRepository::getInstance()->autoReceiptList($day); // var_dump($expiredList->isEmpty()); // var_dump($needAcceptList->isEmpty()); // exit; if (!$expiredList->isEmpty()) { OrderModel::whereIn('id', $expiredList->column('id'))->save([ 'status' => OrderModel::STATUS_EXPIRED, ]); } if (!$needAcceptList->isEmpty()) { OrderModel::whereIn('id', $needAcceptList->column('id'))->save([ 'status' => OrderModel::STATUS_COMPLETED, 'completed_at' => date('Y-m-d H:i:s'), ]); } } }