Commit 208ade83 authored by hujun's avatar hujun

最适合业态搜索

parent fd743851
...@@ -213,7 +213,7 @@ class Houses extends Basic ...@@ -213,7 +213,7 @@ class Houses extends Basic
/*对内楼盘名*/ /*对内楼盘名*/
if ($this->params['internal_title'] != NULL) { if ($this->params['internal_title'] != NULL) {
$where['internal_title'] = [ 'LIKE', '%' . $this->params['internal_title'] . '%' ]; $where['internal_title'] = [ 'LIKE', '%' . trim($this->params['internal_title']) . '%' ];
} }
/*对外楼盘名*/ /*对外楼盘名*/
...@@ -223,7 +223,7 @@ class Houses extends Basic ...@@ -223,7 +223,7 @@ class Houses extends Basic
/*楼盘地址搜索*/ /*楼盘地址搜索*/
if ($this->params['internal_address'] != NULL) { if ($this->params['internal_address'] != NULL) {
$where['internal_address'] = [ 'LIKE', '%' . $this->params['internal_address'] . '%' ]; $where['internal_address'] = [ 'LIKE', '%' . trim($this->params['internal_address']) . '%' ];
} }
/*是否独家0否1是*/ /*是否独家0否1是*/
...@@ -232,11 +232,10 @@ class Houses extends Basic ...@@ -232,11 +232,10 @@ class Houses extends Basic
} }
//适合业态 //适合业态
if (!empty($this->params['fit_industry_type'])) { if (isset($this->params['fit_industry_type']) && trim($this->params['fit_industry_type']) != NULL) {
$where['fit_industry_type'] = ['LIKE', '%'.$this->params['fit_industry_type'].'%']; $where['fit_industry_type'] = ['LIKE', '%'.$this->params['fit_industry_type'].'%'];
} }
/*开始时间*/ /*开始时间*/
if ($this->params['start_date'] != NULL && $this->params['end_date'] == NULL) { if ($this->params['start_date'] != NULL && $this->params['end_date'] == NULL) {
$where['create_time'] = [ '> time', $this->params['start_date'] . ' 00:00:00' ]; $where['create_time'] = [ '> time', $this->params['start_date'] . ' 00:00:00' ];
......
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