Commit 1a9b66fc authored by hujun's avatar hujun

房东手机号搜索

parent 7327b571
......@@ -321,18 +321,20 @@ class Houses extends Basic
/*房东手机号搜索*/
if ($this->params['landlord_phone'] != NULL) {
$m_house_ext = new GHousesExt();
$m_house_ext = new GLandlordPhone();
if (strlen($this->params['landlord_phone']) != 11) {
return $this->response(101, '房东手机不足11位');
}
$house_ext_where['landlord_phone'] = ['LIKE','%'.$this->params['landlord_phone'].'%'];
$landlord_arr = $m_house_ext->getList(1,1000, '', 'house_id', $house_ext_where);
$landlord_where['phone'] = ['LIKE','%'.$this->params['landlord_phone'].'%'];
$landlord_where['status'] = 0;
$landlord_arr = $m_house_ext->getList(1,1000, '', 'house_id', $landlord_where);
if (empty($landlord_arr)) {
$data['data']['list'] = [];
$data['data']['total'] = 0;
return $this->response(200, '', $data);
} else {
$landlord_house_id = [];
foreach ($landlord_arr as $k=>$v) {
$landlord_house_id[] = $v['house_id'];
}
......
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