|
@@ -420,7 +420,7 @@ class StoreProduct extends AuthController
|
|
|
['in_stock', 0],
|
|
['in_stock', 0],
|
|
|
]);
|
|
]);
|
|
|
if ($where['in_stock'] < 1) return app('json')->fail('补货数量不能少于1');
|
|
if ($where['in_stock'] < 1) return app('json')->fail('补货数量不能少于1');
|
|
|
- $info = StoreProductAttrValue::alias('a')->join("StoreProduct b", "a.product_id=b.id", "left")->where('a.bar_code', $where['bar_code'])->field('a.price,a.unique,a.stock as in_stock,a.product_id,b.store_name,b.image,a.bar_code')->find();
|
|
|
|
|
|
|
+ $info = StoreProductAttrValue::alias('a')->join("StoreProduct b", "a.product_id=b.id", "left")->where('a.type', 0)->where('a.bar_code', $where['bar_code'])->field('a.price,a.unique,a.stock as in_stock,a.product_id,b.store_name,b.image,a.bar_code')->find();
|
|
|
if (!$info) return app('json')->fail('商品条形码不存在');
|
|
if (!$info) return app('json')->fail('商品条形码不存在');
|
|
|
$info = $info->toarray();
|
|
$info = $info->toarray();
|
|
|
$info['in_stock'] = $where['in_stock'];
|
|
$info['in_stock'] = $where['in_stock'];
|