From bf781d5ab2fb7454c30976ba2b05383201533eae Mon Sep 17 00:00:00 2001 From: Terry <2358269014@qq.com> Date: Mon, 28 Oct 2019 11:19:02 +0800 Subject: [PATCH] =?UTF-8?q?product=20mongodb=20=E5=8F=98=E9=87=8F=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/product/ProductMongodb.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/product/ProductMongodb.php b/services/product/ProductMongodb.php index be075a69..a3019316 100644 --- a/services/product/ProductMongodb.php +++ b/services/product/ProductMongodb.php @@ -509,6 +509,11 @@ class ProductMongodb extends Service implements ProductInterface $one['category'] = $c; } + $one['price'] = (float) $one['price']; + $one['cost_price'] = (float) $one['cost_price']; + $one['special_price'] = (float) $one['special_price']; + $one['final_price'] = (float) $one['final_price']; + $saveStatus = Yii::$service->helper->ar->save($model, $one); $product_id = (string)$model->{$this->getPrimaryKey()}; -- GitLab