|
|
@@ -87,9 +87,7 @@ class StoreProduct extends BaseModel
|
|
|
if (isset($where['bar_code']) && $where['bar_code'] != '') {
|
|
|
$product_id = StoreProductAttrValue::where('bar_code', $where['bar_code'])->column('product_id');
|
|
|
if ($product_id) {
|
|
|
- $where['product_id'] = $product_id;
|
|
|
- } else {
|
|
|
- $where['product_id'] = 0;
|
|
|
+ $model = $model->where('id', 'in', $product_id);
|
|
|
}
|
|
|
}
|
|
|
if (isset($where['is_consumer']) && $where['is_consumer'] > -1) $model = $model->where(['is_consumer' => $where['is_consumer']]);
|