Commit 81570431 authored by hujun's avatar hujun

增加字段

parent 9e056357
...@@ -12,6 +12,7 @@ namespace app\index\controller; ...@@ -12,6 +12,7 @@ namespace app\index\controller;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\index\service\OfficeRoomService; use app\index\service\OfficeRoomService;
use app\index\service\OfficeService; use app\index\service\OfficeService;
use app\model\OfficeACollectHouse;
class OfficeRoom extends Basic class OfficeRoom extends Basic
{ {
...@@ -131,6 +132,14 @@ class OfficeRoom extends Basic ...@@ -131,6 +132,14 @@ class OfficeRoom extends Basic
$result = $this->service->getRoomList($this->params, 1); $result = $this->service->getRoomList($this->params, 1);
if ($result['status'] == 'successful') { if ($result['status'] == 'successful') {
$m_collect = new OfficeACollectHouse();
foreach ($result['data'] as $k=>$v) {
$where['agents_id'] = $this->userId;
$where['house_id'] = $v['id'];
$where['status'] = 1;
$is_collect = $m_collect->getFieldOneValue('id', $where);
$result['data'][$k]['is_collect'] = $is_collect ? $is_collect : 0;
}
$data['list'] = $result['data']; $data['list'] = $result['data'];
$data['total'] = $result['total']; $data['total'] = $result['total'];
} else { } else {
......
...@@ -804,7 +804,7 @@ class OfficeRoomService ...@@ -804,7 +804,7 @@ class OfficeRoomService
/*盘方 start*/ /*盘方 start*/
if ($params['dish_id'] != NULL) { if ($params['dish_id'] != NULL) {
$agent_where['a.agents_id'] = $params['dish_id']; $agent_where['a.agent_id'] = $params['dish_id'];
$agent_where['a.type'] = 2; $agent_where['a.type'] = 2;
$agent_where['a.is_del'] = 0; $agent_where['a.is_del'] = 0;
} }
...@@ -860,7 +860,7 @@ class OfficeRoomService ...@@ -860,7 +860,7 @@ class OfficeRoomService
} }
/*房东手机号搜索 end*/ /*房东手机号搜索 end*/
$field = 'a.id,b.type,b.disc,b.business_district_id,b.title,a.price_total,a.area,a.station_start,a.station_end,'; $field = 'a.id,b.type,b.disc,b.business_district_id,b.title,a.price_total,a.area,a.station_start,a.station_end,';
$field .= 'a.status,a.is_rent,a.is_show,a.create_time,a.floor_tag,a.price,a.building_id'; $field .= 'a.status,a.is_rent,a.is_show,a.create_time,a.floor_tag,a.price,a.building_id,a.is_carefully_chosen';
$room_data = $this->m_office_room->getRoomAgent($page_no, $page_size, $field, $where); $room_data = $this->m_office_room->getRoomAgent($page_no, $page_size, $field, $where);
$m_business = new GBusinessDistrict(); $m_business = new GBusinessDistrict();
......
...@@ -5,7 +5,7 @@ namespace app\model; ...@@ -5,7 +5,7 @@ namespace app\model;
use think\Db; use think\Db;
use think\Model; use think\Model;
class OfficeACollectHouse extends Model class OfficeACollectHouse extends BaseModel
{ {
// 设置当前模型对应的完整数据表名称 // 设置当前模型对应的完整数据表名称
protected $table = 'office_a_collect_house'; protected $table = 'office_a_collect_house';
......
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