|
@@ -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 = [];
|