Commit 14c59e58 authored by hangjun83's avatar hangjun83

百化产品接口更新

parent a57a1f3f
......@@ -48,6 +48,14 @@ class BhuaProductsService
public function getProductsByBrandId($params)
{
if(!isset($params['brand_id']) || empty($params['brand_id'])){
throw new \Exception('品牌id必传',502);
}
if(!in_array($params['brand_id'],[40,1,10,108,42])){
throw new \Exception('品牌id不在授权范围之内',502);
}
$offset = !isset($requestParams['page_size']) || empty($requestParams['page_size']) ? 2000 : $requestParams['page_size'];
if($offset > 200){
$offset = 200;
......@@ -57,7 +65,7 @@ class BhuaProductsService
try{
$brand = $this->bhuaProductService->brandsRepository->getBrandById($params['brand_id']);
if(!$brand){
throw new \Exception('502','没找到相应品牌id');
throw new \Exception('没找到相应品牌id',502);
}
$where = [
'b_id' => $params['brand_id'],
......
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