$goods=new Goods();
$where = [
'and',
['shop_id' => $shopId]
];
if($status > 0){
$where[] = ['status' => $status];
}
if($keyword){
$where[]=['like', 'name', $keyword];
}
yii 组装多个条件
最新推荐文章于 2022-05-29 13:09:34 发布