I add store_id in catalogrule,catalogrule_product, catalogrule_product_price table,
i use magento 2.4.5
now set condition
<preference for="MagentoCatalogRuleModelResourceModelRule"
type="TestStoreViewRulesModelResourceModelRule"/>
public function getRulePrices(DateTimeInterface $date, $websiteId, $customerGroupId, $productIds)
{
$storeId = (int)$this->_storeManager->getStore()->getId();
$connection = $this->getConnection();
$select = $connection->select()
->from($this->getTable('catalogrule_product_price'), ['product_id', 'rule_price'])
->where('rule_date = ?', $date->format('Y-m-d'))
->where('website_id = ?', $websiteId)
->where('(store_id = ? OR store_id = 0 OR store_id IS NULL)', $storeId)
->where('customer_group_id = ?', $customerGroupId)
->where('product_id IN(?)', $productIds, Zend_Db::INT_TYPE);
return $connection->fetchPairs($select);
}
here working simple product but not working for configurable product