Commit b8fe6ea6 authored by clone's avatar clone

1

parent c6c3a398
...@@ -95,8 +95,15 @@ class OfficeRoomApiService ...@@ -95,8 +95,15 @@ class OfficeRoomApiService
if (isset($params['price_total_start']) && isset($params['price_total_end'])) { if (isset($params['price_total_start']) && isset($params['price_total_end'])) {
$where['a.price_total'] = ['between', [$params['price_total_start'] * 100, $params['price_total_end'] * 100]]; //租金总单价 $where['a.price_total'] = ['between', [$params['price_total_start'] * 100, $params['price_total_end'] * 100]]; //租金总单价
} }
if (isset($params['shop_sign'])) { if (isset($params['shop_sign']) && $params['shop_sign'] != "全部") { //商铺标签
$where['a.shop_sign'] = ['like', '%' . $params['shop_sign'] . '%']; //商铺标签 $shopTagsArr = array_filter(explode(',', $params['shop_sign']));
if (count($shopTagsArr) == 1) {
$where['a.shop_sign'] = array('like', "%" . trim($shopTagsArr[0]) . "%");
} else {
foreach ($shopTagsArr as $key => $val) {
$where['a.shop_sign'][] = array('like', "%" . trim($val) . "%");
}
}
} }
if (isset($params['stations_ids'])) { if (isset($params['stations_ids'])) {
$ids = $this->getBuildingByStations($params['stations_ids']); $ids = $this->getBuildingByStations($params['stations_ids']);
......
...@@ -1317,9 +1317,18 @@ class OfficeRoomService ...@@ -1317,9 +1317,18 @@ class OfficeRoomService
if (isset($params['status'])) { if (isset($params['status'])) {
$where['a.status'] = $params['status']; //状态 1上架 2下架 $where['a.status'] = $params['status']; //状态 1上架 2下架
} }
if (isset($params['is_show'])) {
if (isset($params['shop_sign'])) { $where['a.is_show'] = $params['is_show']; //状态 是否对客户显示
$where['a.shop_sign'] = ['like', '%' . $params['shop_sign'] . '%']; //商铺标签 }
if (isset($params['shop_sign']) && $params['shop_sign'] != "全部") { //商铺标签
$shopTagsArr = array_filter(explode(',', $params['shop_sign']));
if (count($shopTagsArr) == 1) {
$where['a.shop_sign'] = array('like', "%" . trim($shopTagsArr[0]) . "%");
} else {
foreach ($shopTagsArr as $key => $val) {
$where['a.shop_sign'][] = array('like', "%" . trim($val) . "%");
}
}
} }
if (isset($params['is_carefully_chosen'])) { if (isset($params['is_carefully_chosen'])) {
......
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