else if($type == 'protuct')
{
$where = '';
$value = [];
if (!empty($start_aim)) {
$where .= ' AND start_city = :start_city';
$value['start_city'] = trim($start_aim);
}
if (!empty($end_aim)) {
$where .= ' AND end_city = :end_city';
$value['end_city'] = trim($end_aim);
}
if (!empty($order_category)) {
$where .= ' AND order_category = :order_category';
$value['order_category'] = trim($order_category);
}
if (!empty($start_time)) {
$where .= ' AND start_time = :start_time';
$value['shiptime'] = trim($start_time);
}
$productslist =Db::name('order')->whereRaw($where . '', $value)->where('status','<>','-1')->order($order)->select();
}
tp5根据前端传值进行条件查询
最新推荐文章于 2021-12-01 19:55:47 发布