Commit c597f1dd authored by hujun's avatar hujun

商铺收搜

parent de708211
...@@ -111,6 +111,9 @@ class Houses extends Basic ...@@ -111,6 +111,9 @@ class Houses extends Basic
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$where['a.status'] = [ '<>', 3 ];
$where['b.is_del'] = 0;
/*精选商铺--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['is_carefully_chosen'] = $this->params['is_carefully_chosen'];
...@@ -195,29 +198,26 @@ class Houses extends Basic ...@@ -195,29 +198,26 @@ class Houses extends Basic
$where['industry_type'] = [ 'LIKE', '%' . $this->params['industry_type'] . '%' ]; $where['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,
//案场权限人搜索 a.shop_area_start,a.shop_area_end,a.industry_type';
if (empty($this->params['dish'])) {
/*楼盘编号*/
if (!empty($this->params['id'])) {
$where['id'] = $this->params['id'];
}
$where['status'] = [ '<>', 3 ];
$data['data']['list'] = $this->house->getHouseList($pageNo, $pageSize, 'id DESC', $fields, $where, $this->userId);
$data['data']['total'] = $this->house->getHouseListTotal($where);
} else {
//盘方人搜索
/*楼盘编号*/ /*楼盘编号*/
if ($this->params['id'] != NULL) { if ($this->params['id'] != NULL) {
$where['a.id'] = $this->params['id']; $where['a.id'] = $this->params['id'];
} }
$where['a.status'] = [ '<>', 3 ];
$where['c.name'] = [ 'LIKE', '%' . $this->params['dish'] . '%' ]; if ($this->params['dish_name'] != NULL) {
$where['c.name'] = [ 'LIKE', '%' . $this->params['dish_name'] . '%' ];
$where['b.type'] = [ '=', 2 ]; $where['b.type'] = [ '=', 2 ];
$where['b.is_del'] = 0; }
if ($this->params['dish_phone'] != NULL) {
$where['c.phone'] = [ 'LIKE', '%' . $this->params['dish_phone'] . '%' ];
$where['b.type'] = [ '=', 2 ];
}
$data['data']['list'] = $this->house->getHouseListDish($pageNo, $pageSize, 'a.id DESC', $fields, $where, $this->userId); $data['data']['list'] = $this->house->getHouseListDish($pageNo, $pageSize, 'a.id DESC', $fields, $where, $this->userId);
$data['data']['total'] = $this->house->getHouseListDishTotal($where); $data['data']['total'] = $this->house->getHouseListDishTotal($where);
}
$look_shop = new LookShopService(); $look_shop = new LookShopService();
......
...@@ -270,8 +270,12 @@ class GHouses extends BaseModel ...@@ -270,8 +270,12 @@ class GHouses extends BaseModel
->page($pageNo) ->page($pageNo)
->select(); ->select();
$house_id = array(); $house_id = array();
$house_follow_up = new GHousesFollowUp();
foreach ($data as $k => $v) { foreach ($data as $k => $v) {
$house_id[$k] = $v['id']; $house_id[$k] = $v['id'];
$v->create_time = date('Y-m-d', strtotime($v->create_time));
$data[$k]['last_follow_up'] = $house_follow_up->where('house_id',$v['id'])->value('create_time');
} }
$result = array(); $result = 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