Commit d5655218 authored by hujun's avatar hujun

房源搜索

parent b4e775bd
......@@ -900,17 +900,17 @@ class OfficeRoomService
$where = [];
/*所在区*/
if (isset($params['disc'])) {
$where['a.disc'] = $params['disc'];
$where['b.disc'] = $params['disc'];
}
/*所在市*/
if (isset($params['city'])) {
$where['a.city'] = $params['city'];
$where['b.city'] = $params['city'];
}
/*商圈*/
if (isset($params['business_district_id'])) {
$where['c.business_district_id'] = $params['business_district_id'];
$where['b.business_district_id'] = $params['business_district_id'];
}
/*状态 1上架 2下架*/
......@@ -981,7 +981,7 @@ class OfficeRoomService
/*可容纳工位*/
if (isset($params['station_end']) && isset($params['station_start'])) {
$where['a.station_start'] = ['>', $params['station_start']];
$where['a.station_end'] = ['>', $params['station_end']];
$where['a.station_end'] = ['<', $params['station_end']];
}
//编号
......@@ -991,7 +991,7 @@ class OfficeRoomService
//地址
if (isset($params['address'])) {
$where['a.address'] = ['like', '%'.$params['address'].'%'];
$where['b.address'] = ['like', '%'.$params['address'].'%'];
}
//是否独家0否1是
......
......@@ -310,6 +310,7 @@ class OfficeGRoom extends BaseModel
->limit($page_size)
->page($page_no)
->group('a.id')
->order('a.id desc')
->select();
}
......
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