wysf
bruce 9 months ago
parent 7507ab918d
commit 86bdc28a69
  1. 4
      app/common/model/Goods.php

@ -311,6 +311,7 @@ class Goods extends BaseModel
'goodsName' => null, // 商品名称
'goodsNo' => null, // 商品编码
'status' => 0, // 商品状态(0全部 10上架 20下架)
'keywords' => []
]);
// 实例化新查询对象
@ -342,6 +343,9 @@ class Goods extends BaseModel
$a = 1;
}
if(count($params['keywords']) > 0 ) {
$filter[] = ['goods_name', 'like', "%{$params['keywords']}%"];
}
// 商品名称
!empty($params['goodsName']) && $filter[] = ['goods_name', 'like', "%{$params['goodsName']}%"];
// 商品编码

Loading…
Cancel
Save