Kirin 2 anos atrás
pai
commit
44848ecae1
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      app/models/system/SystemStoreStock.php

+ 4 - 1
app/models/system/SystemStoreStock.php

@@ -35,7 +35,10 @@ class SystemStoreStock extends BaseModel
      */
     public static function store_init($store_id, $num = 100)
     {
-        $list = StoreProduct::where('is_del', 0)->where('is_show', 1)->column('id,is_consumer', 'id');
+        $store = SystemStore::get($store_id);
+        $where['store_id'] = 0;
+        if ($store['is_triple']) $where['store_id'] = $store_id;
+        $list = StoreProduct::where('is_del', 0)->where('is_show', 1)->where($where)->column('id,is_consumer', 'id');
         $data['store_id'] = $store_id;
         $data['in_stock'] = $num;
         $all = [];