feat: 新增产品数据导出接口
This commit is contained in:
@@ -14,6 +14,10 @@ class ProductParamsModel extends ProductParamsBaseModel
|
||||
// 要据产品ID查询
|
||||
public function scopeProductId($query, $id)
|
||||
{
|
||||
return $query->where('product_id', $id);
|
||||
if (is_array($id)) {
|
||||
$query->where('product_id', 'in', $id);
|
||||
return;
|
||||
}
|
||||
$query->where('product_id', '=', $id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,10 @@ class ProductRelatedModel extends ProductRelatedBaseModel
|
||||
// 根据产品ID查询
|
||||
public function scopeProductId($query, $id)
|
||||
{
|
||||
$query->where('product_id', $id);
|
||||
if (is_array($id)) {
|
||||
$query->where('product_id', 'in', $id);
|
||||
return;
|
||||
}
|
||||
$query->where('product_id', '=', $id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user