Commit 4f17df1d authored by clone's avatar clone

搜索商铺

parent f5688ecb
...@@ -50,6 +50,7 @@ class Shop extends Basic ...@@ -50,6 +50,7 @@ class Shop extends Basic
"house_id" => 4, "house_id" => 4,
"is_carefully_chosen" => 0, //精选商铺--0否1是 "is_carefully_chosen" => 0, //精选商铺--0否1是
"shop_type" => 0, //商铺类型(0商场,1街铺) "shop_type" => 0, //商铺类型(0商场,1街铺)
"address" => "111",
"disc" => "黄浦区", "disc" => "黄浦区",
"industry_type" => "休闲娱乐", "industry_type" => "休闲娱乐",
"shop_area_start" => 45,//面积起始范围 街铺start和end面积一样 "shop_area_start" => 45,//面积起始范围 街铺start和end面积一样
...@@ -90,6 +91,14 @@ class Shop extends Basic ...@@ -90,6 +91,14 @@ class Shop extends Basic
} else if (isset($params['title'])) { } else if (isset($params['title'])) {
$conditions['internal_title'] = array( "like", "%" . trim($params['title']) . "%" ); $conditions['internal_title'] = array( "like", "%" . trim($params['title']) . "%" );
} }
//c端查对外的名字 b端查对内的名字
if (isset($params['address']) && $params['site_area'] == 1 || $params['site_area'] == 2) {
$conditions['external_address'] = array( "like", "%" . trim($params['address']) . "%" );
} else if (isset($params['title'])) {
$conditions['internal_address'] = array( "like", "%" . trim($params['address']) . "%" );
}
if (isset($params['house_id'])) { if (isset($params['house_id'])) {
$conditions['id'] = array( "eq", $params['house_id'] ); $conditions['id'] = array( "eq", $params['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