From ffe4c6836874be3d33fc8e6cf4ec03c763a98b0a Mon Sep 17 00:00:00 2001 From: root Date: Tue, 11 Apr 2017 18:28:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/product/ProductMongodb.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/product/ProductMongodb.php b/services/product/ProductMongodb.php index 8f46e2f0..86d29473 100644 --- a/services/product/ProductMongodb.php +++ b/services/product/ProductMongodb.php @@ -156,8 +156,7 @@ 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)) -- GitLab