Commit ec2ac01d authored by hujun's avatar hujun

商铺列表搜索

parent 1a327ab0
...@@ -172,6 +172,11 @@ class Houses extends Basic ...@@ -172,6 +172,11 @@ class Houses extends Basic
$where['a.internal_title'] = [ 'LIKE', '%' . $this->params['internal_title'] . '%' ]; $where['a.internal_title'] = [ 'LIKE', '%' . $this->params['internal_title'] . '%' ];
} }
/*对外楼盘名*/
if ($this->params['external_title'] != NULL) {
$where['a.external_title'] = [ 'LIKE', '%' . $this->params['external_title'] . '%' ];
}
/*楼盘地址搜索*/ /*楼盘地址搜索*/
if ($this->params['internal_address'] != NULL) { if ($this->params['internal_address'] != NULL) {
$where['a.internal_address'] = [ 'LIKE', '%' . $this->params['internal_address'] . '%' ]; $where['a.internal_address'] = [ 'LIKE', '%' . $this->params['internal_address'] . '%' ];
...@@ -236,6 +241,19 @@ class Houses extends Basic ...@@ -236,6 +241,19 @@ class Houses extends Basic
$where['d.landlord_phone'] = [ 'LIKE', '%' . $this->params['landlord_phone'] . '%' ]; $where['d.landlord_phone'] = [ 'LIKE', '%' . $this->params['landlord_phone'] . '%' ];
} }
if (empty($this->params['area'])) {
switch ($this->params['area']) {
case 1:
$where['a.shop_area_start'] = ['between', [0, 30]];break;
case 2:
$where['a.shop_area_start'] = ['between', [30, 60]];break;
case 3:
$where['a.shop_area_start'] = ['between', [60, 100]];break;
default :
$where['a.shop_area_start'] = ['>', 100];
}
}
$data['data']['list'] = $this->house->getHouseListDish($pageNo, $pageSize, 'a.id DESC', $fields, $where, $this->userId); $data['data']['list'] = $this->house->getHouseListDish($pageNo, $pageSize, 'a.id DESC', $fields, $where, $this->userId);
$data['data']['total'] = $this->house->getHouseListDishTotal($where); $data['data']['total'] = $this->house->getHouseListDishTotal($where);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment