Commit e67d830e authored by zhuwei's avatar zhuwei

房东手机号搜索

parent a5e4689b
...@@ -204,7 +204,7 @@ class Houses extends Basic ...@@ -204,7 +204,7 @@ class Houses extends Basic
} }
$fields = 'a.id,a.shop_type,a.internal_title,a.rent_price,a.is_show,a.create_time,a.residue_num,a.rent_type, $fields = 'a.id,a.shop_type,a.internal_title,a.rent_price,a.is_show,a.create_time,a.residue_num,a.rent_type,
a.shop_area_start,a.shop_area_end,a.industry_type'; a.shop_area_start,a.shop_area_end,a.industry_type,d.landlord_phone';
/*楼盘编号*/ /*楼盘编号*/
if ($this->params['id'] != NULL) { if ($this->params['id'] != NULL) {
...@@ -221,6 +221,12 @@ class Houses extends Basic ...@@ -221,6 +221,12 @@ class Houses extends Basic
$where['b.type'] = [ '=', 2 ]; $where['b.type'] = [ '=', 2 ];
} }
/*房东手机号搜索*/
if ($this->params['landlord_phone'] != NULL) {
$where['d.landlord_phone'] = [ 'LIKE', '%' . $this->params['landlord_phone'] . '%' ];
}
$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);
......
...@@ -264,6 +264,7 @@ class GHouses extends BaseModel ...@@ -264,6 +264,7 @@ class GHouses extends BaseModel
$data = $this->field($field)->alias('a') $data = $this->field($field)->alias('a')
->join('g_houses_to_agents b', 'a.id=b.houses_id', 'left') ->join('g_houses_to_agents b', 'a.id=b.houses_id', 'left')
->join('a_agents c', 'b.agents_id=c.id', 'left') ->join('a_agents c', 'b.agents_id=c.id', 'left')
->join('g_houses_ext d', 'a.id=d.house_id', 'left')
->where($params) ->where($params)
->order($order_) ->order($order_)
->limit($pageSize) ->limit($pageSize)
...@@ -331,6 +332,7 @@ class GHouses extends BaseModel ...@@ -331,6 +332,7 @@ class GHouses extends BaseModel
$data = $this->alias('a') $data = $this->alias('a')
->join('g_houses_to_agents b', 'a.id=b.houses_id', 'left') ->join('g_houses_to_agents b', 'a.id=b.houses_id', 'left')
->join('a_agents c', 'b.agents_id=c.id', 'left') ->join('a_agents c', 'b.agents_id=c.id', 'left')
->join('g_houses_ext d', 'a.id=d.house_id', 'left')
->where($params) ->where($params)
->count(); ->count();
return $data; return $data;
......
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