Commit 9af87024 authored by hujun's avatar hujun

商铺地址搜索

parent 23b898df
...@@ -116,57 +116,62 @@ class Houses extends Basic ...@@ -116,57 +116,62 @@ class Houses extends Basic
/*精选商铺--0是1否*/ /*精选商铺--0是1否*/
if ($this->params['is_carefully_chosen'] != -1) { if ($this->params['is_carefully_chosen'] != -1) {
$where['is_carefully_chosen'] = $this->params['is_carefully_chosen']; $where['a.is_carefully_chosen'] = $this->params['is_carefully_chosen'];
} }
/*0是1否显示在c端用户*/ /*0是1否显示在c端用户*/
if ($this->params['is_show'] != -1) { if ($this->params['is_show'] != -1) {
$where['is_show'] = $this->params['is_show']; $where['a.is_show'] = $this->params['is_show'];
} }
/*商铺类型(0商场,1街铺)*/ /*商铺类型(0商场,1街铺)*/
if ($this->params['shop_type'] != -1) { if ($this->params['shop_type'] != -1) {
$where['shop_type'] = $this->params['shop_type']; $where['a.shop_type'] = $this->params['shop_type'];
} }
/*所在城市*/ /*所在城市*/
if (!empty($this->params['city'])) { if (!empty($this->params['city'])) {
$where['city'] = $this->params['city']; $where['a.city'] = $this->params['city'];
} }
/*所在区*/ /*所在区*/
if (!empty($this->params['disc'])) { if (!empty($this->params['disc'])) {
$where['disc'] = $this->params['disc']; $where['a.disc'] = $this->params['disc'];
} }
/*状态 0待审批 1上架 2下架 3回收*/ /*状态 0待审批 1上架 2下架 3回收*/
if (!empty($this->params['status'])) { if (!empty($this->params['status'])) {
$where['status'] = $this->params['status']; $where['a.status'] = $this->params['status'];
} }
/*价格 -1表示营业额扣点 存分*/ /*价格 -1表示营业额扣点 存分*/
if ($this->params['rent_price'] != NULL && $this->params['rent_price'] != -1) { if ($this->params['rent_price'] != NULL && $this->params['rent_price'] != -1) {
$where['rent_type'] = 1; $where['a.rent_type'] = 1;
switch ($this->params['rent_price']) { switch ($this->params['rent_price']) {
case 1: case 1:
$where['rent_price'] = [ '<=', 1000000 ]; $where['a.rent_price'] = [ '<=', 1000000 ];
break; break;
case 2: case 2:
$where['rent_price'] = [ 'between', '1000000,3000000' ]; $where['a.rent_price'] = [ 'between', '1000000,3000000' ];
break; break;
default : default :
$where['rent_price'] = [ '>', '3000000' ]; $where['a.rent_price'] = [ '>', '3000000' ];
} }
} }
/*对内楼盘名*/ /*对内楼盘名*/
if ($this->params['internal_title'] != NULL) { if ($this->params['internal_title'] != NULL) {
$where['internal_title'] = [ 'LIKE', '%' . $this->params['internal_title'] . '%' ]; $where['a.internal_title'] = [ 'LIKE', '%' . $this->params['internal_title'] . '%' ];
}
/*楼盘地址搜索*/
if ($this->params['internal_address'] != NULL) {
$where['a.internal_address'] = [ 'LIKE', '%' . $this->params['internal_address'] . '%' ];
} }
/*是否独家0否1是*/ /*是否独家0否1是*/
if ($this->params['is_exclusive_type'] != -1) { if ($this->params['is_exclusive_type'] != -1) {
$where['is_exclusive_type'] = $this->params['is_exclusive_type']; $where['a.is_exclusive_type'] = $this->params['is_exclusive_type'];
} }
/*开始时间*/ /*开始时间*/
...@@ -187,15 +192,15 @@ class Houses extends Basic ...@@ -187,15 +192,15 @@ class Houses extends Basic
/*根据库存判断是否已租*/ /*根据库存判断是否已租*/
if ($this->params['leased'] != -1) { if ($this->params['leased'] != -1) {
if ($this->params['leased'] == 0) { if ($this->params['leased'] == 0) {
$where['residue_num'] = 0; $where['a.residue_num'] = 0;
} else { } else {
$where['residue_num'] = [ '<>', 0 ]; $where['a.residue_num'] = [ '<>', 0 ];
} }
} }
/*业态*/ /*业态*/
if ($this->params['industry_type'] != NULL) { if ($this->params['industry_type'] != NULL) {
$where['industry_type'] = [ 'LIKE', '%' . $this->params['industry_type'] . '%' ]; $where['a.industry_type'] = [ 'LIKE', '%' . $this->params['industry_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, $fields = 'a.id,a.shop_type,a.internal_title,a.rent_price,a.is_show,a.create_time,a.residue_num,a.rent_type,
......
...@@ -268,6 +268,7 @@ class GHouses extends BaseModel ...@@ -268,6 +268,7 @@ class GHouses extends BaseModel
->order($order_) ->order($order_)
->limit($pageSize) ->limit($pageSize)
->page($pageNo) ->page($pageNo)
->group('a.id')
->select(); ->select();
$house_id = array(); $house_id = array();
......
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