Compare commits

...

3 Commits

  1. 5
      app/common/model/Goods.php

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

Loading…
Cancel
Save