|
@@ 261-264 (lines=4) @@
|
| 258 |
|
foreach ($properties as $propertyId => $propertyStaticValues) { |
| 259 |
|
$subQuery = self::initSubQuery($category_id, $joinCondition); |
| 260 |
|
$subQuery->andWhere(['property_static_value_id' => $propertyStaticValues,]); |
| 261 |
|
$subQueryOptimisation = Yii::$app->db->cache(function($db) use ($subQuery) { |
| 262 |
|
$ids = implode(', ', $subQuery->createCommand($db)->queryColumn()); |
| 263 |
|
return empty($ids) === true ? '(-1)' : "($ids)"; |
| 264 |
|
}, 86400, new TagDependency([ |
| 265 |
|
'tags' => [ |
| 266 |
|
ActiveRecordHelper::getCommonTag(ObjectStaticValues::className()), |
| 267 |
|
] |
|
@@ 280-283 (lines=4) @@
|
| 277 |
|
->andWhere('p.price <= (:max_price * currency.convert_nominal / currency.convert_rate)', |
| 278 |
|
[':max_price' => $priceMax]) |
| 279 |
|
->leftJoin(Currency::tableName() . ' ON currency.id = p.currency_id'); |
| 280 |
|
$subQueryOptimisation = Yii::$app->db->cache(function($db) use ($subQuery) { |
| 281 |
|
$ids = implode(', ', $subQuery->createCommand($db)->queryColumn()); |
| 282 |
|
return empty($ids) === true ? '(-1)' : "($ids)"; |
| 283 |
|
}, 86400, new TagDependency([ |
| 284 |
|
'tags' => [ |
| 285 |
|
ActiveRecordHelper::getCommonTag(ObjectStaticValues::className()), |
| 286 |
|
] |