\Block\Account\Message\Message.php
public function getAffiliateCustomerCollection()
{
$customerId = $this->customerSession->getCustomer()->getId();
$affiliatecustomer = $this->_affiliateFactory->create();
$customer = $this->_customerFactory->create()->getCollection();
$collection = $affiliatecustomer ->getCollection();
$joinConditions = 'customer_entity.entity_id = affiliate.customer_id';
$collection->getSelect()->join(
['affiliate' => $collection->getTable('affiliate_account')],
$joinConditions,
[]
);
$collection ->addFieldToFilter('customer_id', $customerId);
return $collection;
}
This function not join the customer collection with affiliate customer collection and cannot identify the issue with joining these two collections