53 private $metadataPool;
67 \
Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
74 $this->_localeDate = $localeDate;
86 if (
null === $this->_connection) {
87 $this->_connection = $this->_resource->getConnection();
101 foreach ($this->_storeManager->getStores(
true) as
$store) {
102 $timestamp = $this->_localeDate->scopeTimeStamp(
$store);
103 $currDate = $this->_dateTime->formatDate($timestamp,
false);
107 if (date(
'H', $timestamp) ==
'00') {
139 $attribute = $this->_eavConfig->getAttribute(\
Magento\Catalog\Model\Product::ENTITY, $attrCode);
142 $linkField = $this->getMetadataPool()->getMetadata(CategoryInterface::class)->getLinkField();
143 $identifierField = $this->getMetadataPool()->getMetadata(CategoryInterface::class)->getIdentifierField();
148 [
'attr' => $this->_resource->getTableName([
'catalog_product_entity',
'datetime'])],
150 $identifierField =>
'cat.' . $identifierField,
153 [
'cat' => $this->_resource->getTableName(
'catalog_product_entity')],
154 'cat.' . $linkField .
'= attr.' . $linkField,
157 'attr.attribute_id = ?',
169 if (!empty($selectData)) {
170 $this->_processor->getIndexer()->reindexList($selectData);
180 private function getMetadataPool()
182 if (
null === $this->metadataPool) {
185 return $this->metadataPool;
_refreshSpecialPriceByStore($storeId, $attrCode, $attrConditionValue)
__construct(\Magento\Store\Model\StoreManagerInterface $storeManager, ResourceConnection $resource, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Eav\Model\Config $eavConfig, \Magento\Catalog\Model\Indexer\Product\Price\Processor $processor)