Commit cce4210c authored by hangjun83's avatar hangjun83

百化产品接口更新

parent 85d33e7e
...@@ -59,11 +59,16 @@ class BhuaProductsService ...@@ -59,11 +59,16 @@ class BhuaProductsService
if(!$brand){ if(!$brand){
throw new \Exception('502','没找到相应品牌id'); throw new \Exception('502','没找到相应品牌id');
} }
$products = $this->bhuaProductService->productRepository->getProductsList(['b_id' => $params['brand_id']], $offset, $limit); $where = [
'b_id' => $params['brand_id'],
'p_status' => 1,
'p_show' => 1
];
$products = $this->bhuaProductService->productRepository->getProductsList($where, $offset, $limit);
$total = 0; $total = 0;
if($products){ if($products){
$products = app(ProductsTransformer::class)->transform($products); $products = app(ProductsTransformer::class)->transform($products);
$total = $this->bhuaProductService->brandsRepository->count(['b_id' => $params['brand_id']]); $total = $this->bhuaProductService->brandsRepository->count($where);
} }
$dataReturn = []; $dataReturn = [];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment