wang hou sheng 10 months ago
parent 099cb6011e
commit 56dd086816
  1. 3
      app/api/controller/Goods.php
  2. 2
      app/api/service/Goods.php
  3. 10
      app/common/model/Goods.php

@ -296,8 +296,7 @@ class Goods extends Controller
public function brandList(): Json
{
$service = new GoodsService;
$storeid = request()->header()['storeid'];
$goodsList = $service->brandList($storeid);
$goodsList = $service->brandList();
return $this->renderSuccess($goodsList);
}

@ -171,7 +171,7 @@ class Goods extends GoodsService
}
//大牌正品列表
public function brandList($storeid)
public function brandList(): array
{
$model = new GoodsModel;
$parmas = $this->request->get();

@ -428,11 +428,11 @@ class Goods extends BaseModel
!empty($params['goodsNo']) && $filter[] = ['goods_no', 'like', "%{$params['goodsNo']}%"];
//wmc
if (isset($param['is_brand']) && $param['is_brand'] !== '') {
$filter[] = ['is_brand', '=', $param['is_brand']];
if (!empty($param['is_brand'])) {
$filter[] = ['is_brand', '=', intval($param['is_brand'])];
}
if (isset($param['is_new']) && $param['is_new'] !== '') {
$filter[] = ['is_new', '=', $param['is_new']];
if (!empty($param['is_new'])) {
$filter[] = ['is_new', '=', intval($param['is_new'])];
}
if (!empty($param['paihang'])) {
$filter[] = ['paihang', '>', 0];
@ -445,7 +445,7 @@ class Goods extends BaseModel
if (isset($param['is_in_store']) && $param['is_in_store'] !== '') {
$filter[] = ['is_in_store', '=', $params['is_in_store']];
}
if (isset($param['store_id']) && $param['store_id'] !== '') {
$filter[] = ['goods.store_id', '=', $params['store_id']];
}

Loading…
Cancel
Save