Kirin 3 years ago
parent
commit
05bb11c63b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/store/StoreProduct.php

+ 1 - 1
app/models/store/StoreProduct.php

@@ -397,7 +397,7 @@ class StoreProduct extends BaseModel
     public static function getProductStock($productId, $uniqueId = '')
     {
         return $uniqueId == '' ?
-            self::where('id', $productId)->value('stock') ?: 0
+            (self::where('id', $productId)->value('stock') ?: 0)
             : StoreProductAttr::uniqueByStock($uniqueId);
     }