Skip to content

Commit

Permalink
调整mongodb的示例数据
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Apr 10, 2017
1 parent 74b6d78 commit d684555
Show file tree
Hide file tree
Showing 21 changed files with 12 additions and 0 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.article"},{"v":1,"key":{"url_key":{"$numberLong":"-1"}},"name":"url_key_-1","ns":"fecshop_test.article","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}}]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.category"}]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.favorite"},{"v":1,"key":{"user_id":{"$numberLong":"-1"}},"name":"user_id_-1","ns":"fecshop_test.favorite","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}},{"v":1,"key":{"product_id":{"$numberLong":"-1"}},"name":"product_id_-1","ns":"fecshop_test.favorite","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}}]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.log_product_view"}]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.migration"}]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.newsletter"},{"v":1,"key":{"email":{"$numberLong":"-1"}},"name":"email_-1","ns":"fecshop_test.newsletter","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}}]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.product_flat"},{"v":1,"key":{"spu":{"$numberLong":"-1"}},"name":"spu_-1","ns":"fecshop_test.product_flat","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}},{"v":1,"key":{"sku":{"$numberLong":"-1"}},"name":"sku_-1","ns":"fecshop_test.product_flat","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}},{"v":1,"key":{"category":{"$numberLong":"-1"}},"name":"category_-1","ns":"fecshop_test.product_flat","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}}]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.review"},{"v":1,"key":{"product_spu":{"$numberLong":"-1"}},"name":"product_spu_-1","ns":"fecshop_test.review","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}},{"v":1,"key":{"product_sku":{"$numberLong":"-1"}},"name":"product_sku_-1","ns":"fecshop_test.review","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}},{"v":1,"key":{"product_id":{"$numberLong":"-1"}},"name":"product_id_-1","ns":"fecshop_test.review","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}},{"v":1,"key":{"user_id":{"$numberLong":"-1"}},"name":"user_id_-1","ns":"fecshop_test.review","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}}]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.static_block"},{"v":1,"key":{"identify":{"$numberLong":"-1"}},"name":"identify_-1","ns":"fecshop_test.static_block","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}}]}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.url_rewrite"},{"v":1,"key":{"custom_url_key":{"$numberLong":"-1"}},"name":"custom_url_key_-1","ns":"fecshop_test.url_rewrite","w":{"$numberLong":"1"},"background":true,"socketTimeoutMS":{"$numberLong":"300000"}}]}
2 changes: 2 additions & 0 deletions services/product/ProductMongodb.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ public function save($one,$originUrlKey='catalog/product/index'){
Yii::$service->helper->errors->add('Product '.$this->getPrimaryKey().' is not exist');
return;
}
echo new \MongoDB\BSON\ObjectId($primaryVal);
exit;
#验证sku 是否重复
$product_one = Product::find()->asArray()->where([
'<>',$this->getPrimaryKey(),(new \MongoDB\BSON\ObjectId($primaryVal))
Expand Down

0 comments on commit d684555

Please sign in to comment.