提交 d6845559 编写于 作者: R root

调整mongodb的示例数据

上级 74b6d78d
{"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"}}]}
\ No newline at end of file
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.category"}]}
\ No newline at end of file
{"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"}}]}
\ No newline at end of file
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.log_product_view"}]}
\ No newline at end of file
{"options":{},"indexes":[{"v":1,"key":{"_id":1},"name":"_id_","ns":"fecshop_test.migration"}]}
\ No newline at end of file
{"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"}}]}
\ No newline at end of file
{"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"}}]}
\ No newline at end of file
{"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"}}]}
\ No newline at end of file
{"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"}}]}
\ No newline at end of file
{"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"}}]}
\ No newline at end of file
......@@ -156,6 +156,8 @@ class ProductMongodb implements ProductInterface
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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册