瀏覽代碼

Merge branch 'master' of http://git.liuniu946.com/Kirin/zccy

zxhxx 4 年之前
父節點
當前提交
c69d4f21fd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/models/store/StoreProductAttr.php

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

@@ -59,7 +59,7 @@ class StoreProductAttr extends BaseModel
             }
             }
             if ($store_id && $type_id == 0) {
             if ($store_id && $type_id == 0) {
                 $stockinfo = SystemStoreProductStock::where('unique', $value['unique'])->where('store_id', $store_id)->find();
                 $stockinfo = SystemStoreProductStock::where('unique', $value['unique'])->where('store_id', $store_id)->find();
-                $value['price'] = $stockinfo ? $stockinfo['price'] : $value['price'];
+                $value['price'] = ($stockinfo && $stockinfo['price'] > 0) ? $stockinfo['price'] : $value['price'];
             }
             }
             $values[$value['suk']] = $value;
             $values[$value['suk']] = $value;
         }
         }