Model/ResourceModel/Order/Collection.php
public function getSalesCollectionForReviews(
        $orderStatusFromConfig,
        $created,
        $website,
        $campaignOrderIds = []
    ) {
        $storeIds = $website->getStoreIds();
        $collection = $this->orderCollection->create()
            ->addFieldToFilter(
                'main_table.status',
                $orderStatusFromConfig
            )
            ->addFieldToFilter('main_table.created_at', $created)
            ->addFieldToFilter(
                'main_table.store_id',
                ['in' => $storeIds]
            );

        if (!empty($campaignOrderIds)) {
            $collection->addFieldToFilter(
                'main_table.increment_id',
                ['nin' => $campaignOrderIds]
            );
        }

        if ($this->helper->isOnlySubscribersForReview($website->getWebsiteId())) {
            $collection = $this->subscriberFilterer->filterBySubscribedStatus($collection);
        }

        return $collection;
    }
public function getSalesCollectionForReviews(
        $orderStatusFromConfig,
        $created,
        $website,
        $campaignOrderIds = []
    ) {
        $storeIds = $website->getStoreIds();
        $collection = $this->orderCollection->create()
            ->addFieldToFilter(
                'main_table.status',
                $orderStatusFromConfig
            )
            ->addFieldToFilter('main_table.created_at', $created)
            ->addFieldToFilter(
                'main_table.store_id',
                ['in' => $storeIds]
            );

        if (!empty($campaignOrderIds)) {
            $collection->addFieldToFilter(
                'main_table.increment_id',
                ['nin' => $campaignOrderIds]
            );
        }

        if ($this->helper->isOnlySubscribersForReview($website->getWebsiteId())) {
            $collection = $this->subscriberFilterer->filterBySubscribedStatus($collection);
        }

        return $collection;
    }
public function getSalesCollectionForReviews ( $ orderStatusFromConfig , $ created , $ website , $ campaignOrderIds = [ ] ) { $ storeIds = $ website -> getStoreIds ( ) ; $ collection = $ this -> orderCollection -> create ( ) -> addFieldToFilter ( 'main_table.status' , $ orderStatusFromConfig ) -> addFieldToFilter ( 'main_table.created_at' , $ created ) -> addFieldToFilter ( 'main_table.store_id' , [ 'in' => $ storeIds ] ) ; if ( ! empty ( $ campaignOrderIds ) ) { $ collection -> addFieldToFilter ( 'main_table.increment_id' , [ 'nin' => $ campaignOrderIds ] ) ; } if ( $ this -> helper -> isOnlySubscribersForReview ( $ website -> getWebsiteId ( ) ) ) { $ collection = $ this -> subscriberFilterer -> filterBySubscribedStatus ( $ collection ) ; } return $ collection ; }
Get sales collection for review.

@param string $orderStatusFromConfig
@param array $created
@param \Magento\Store\Model\Website $website
@param array $campaignOrderIds

@return \Magento\Sales\Model\ResourceModel\Order\Collection
Get sales collection for review .