Kirin 2 years ago
parent
commit
1142e23d9d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/admin/model/store/StoreProductAttr.php

+ 1 - 1
app/admin/model/store/StoreProductAttr.php

@@ -63,7 +63,7 @@ class StoreProductAttr extends BaseModel
                 return self::setErrorInfo('请填写正确的商品库存');
             if (!isset($value['cost']) || !is_numeric($value['cost']) || floatval($value['cost']) != $value['cost'])
                 return self::setErrorInfo('请填写正确的商品成本价格');
-            if (isset($value['bar_code']) && !$value['bar_code']) {
+            if (isset($value['bar_code']) && $value['bar_code']) {
                 if (StoreProductAttrValue::where('bar_code', $value['bar_code'])
                     ->where(function ($query) use ($productId, $suk) {
                         $query->where('product_id', '<>', $productId)