| @@ 164-178 (lines=15) @@ | ||
| 161 | * @param array $orderNumbers |
|
| 162 | * @return array |
|
| 163 | */ |
|
| 164 | public function getArticleIdsByNumber(array $orderNumbers) |
|
| 165 | { |
|
| 166 | $builder = $this->manager->getConnection()->createQueryBuilder(); |
|
| 167 | ||
| 168 | $rows = $builder->select('d.articleID as articleId') |
|
| 169 | ->from('s_articles_details', 'd') |
|
| 170 | ->where('d.ordernumber IN (:orderNumbers)') |
|
| 171 | ->setParameter('orderNumbers', $orderNumbers, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY) |
|
| 172 | ->execute() |
|
| 173 | ->fetchAll(); |
|
| 174 | ||
| 175 | return array_map(function ($row) { |
|
| 176 | return $row['articleId']; |
|
| 177 | }, $rows); |
|
| 178 | } |
|
| 179 | ||
| 180 | /** |
|
| 181 | * Returns article detail model by |
|
| @@ 782-794 (lines=13) @@ | ||
| 779 | /** |
|
| 780 | * @return array |
|
| 781 | */ |
|
| 782 | public function getAllNonConnectArticleIds() |
|
| 783 | { |
|
| 784 | $builder = $this->manager->getConnection()->createQueryBuilder(); |
|
| 785 | $builder->select('DISTINCT spci.article_id'); |
|
| 786 | $builder->from('s_plugin_connect_items', 'spci'); |
|
| 787 | $builder->where('spci.shop_id IS NULL'); |
|
| 788 | ||
| 789 | $result = $builder->execute()->fetchAll(); |
|
| 790 | ||
| 791 | return array_map(function ($row) { |
|
| 792 | return $row['article_id']; |
|
| 793 | }, $result); |
|
| 794 | } |
|
| 795 | } |
|
| 796 | ||
| @@ 383-396 (lines=14) @@ | ||
| 380 | /** |
|
| 381 | * @return array |
|
| 382 | */ |
|
| 383 | public function fetchConnectStreamIds() |
|
| 384 | { |
|
| 385 | $builder = $this->manager->getConnection()->createQueryBuilder(); |
|
| 386 | ||
| 387 | $results = $builder->select('sa.streamID') |
|
| 388 | ->from('s_product_streams_attributes', 'sa') |
|
| 389 | ->where('sa.connect_is_remote = 1') |
|
| 390 | ->execute() |
|
| 391 | ->fetchAll(); |
|
| 392 | ||
| 393 | return array_map(function ($item) { |
|
| 394 | return $item['streamID']; |
|
| 395 | }, $results); |
|
| 396 | } |
|
| 397 | ||
| 398 | /** |
|
| 399 | * @param int|array $streamId |
|