From 9088d4a256534b54f14f19fddc9998be9ff8c290 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 20 Sep 2016 17:57:28 +0800 Subject: [PATCH] Add notes and partial modification --- services/Search.php | 25 +++++++++++-------------- services/category/CategoryMongodb.php | 2 +- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/services/Search.php b/services/Search.php index ace0bf50b..fdd6403b8 100644 --- a/services/Search.php +++ b/services/Search.php @@ -34,7 +34,6 @@ public function init(){ parent::init(); } - /** * init search engine index */ @@ -100,9 +99,10 @@ protected function actionGetSearchProductColl($select,$where,$pageNum,$numPerPag } } - /** * 得到搜索的sku列表侧栏的过滤 + * @property $filter_attr | Array + * @property $where | Array */ protected function actionGetFrontSearchFilter($filter_attr,$where){ $currentLangCode= Yii::$service->store->currentLangCode; @@ -126,9 +126,9 @@ protected function actionGetFrontSearchFilter($filter_attr,$where){ } } - /** * 通过product_id删除搜索数据 + * @property $product_id | \mongoId */ protected function actionRemoveByProductId($product_id){ $searchEngineList = $this->getAllChildServiceName(); @@ -139,15 +139,12 @@ protected function actionRemoveByProductId($product_id){ } } } + + + + + + + + } - - - - - - - - - - - diff --git a/services/category/CategoryMongodb.php b/services/category/CategoryMongodb.php index 37b4745c7..7674f523d 100644 --- a/services/category/CategoryMongodb.php +++ b/services/category/CategoryMongodb.php @@ -215,7 +215,7 @@ protected function getParentCategory($parent_id){ if($parent_id === '0'){ return []; } - $category = Category::find()->asArray()->where(['_id' => new \mongoId($parent_id)])->one(); + $category = Category::find()->asArray()->where(['_id' => new \MongoId($parent_id)])->one(); if(isset($category['_id']) && !empty($category['_id']) ){ $currentUrlKey = $category['url_key']; $currentName = $category['name'];