Commit dd05ef6a authored by zhuwei's avatar zhuwei

1

parent e403b707
...@@ -594,11 +594,12 @@ class OfficeRoomService ...@@ -594,11 +594,12 @@ class OfficeRoomService
*/ */
public function getOfficeRoomInfo($id){ public function getOfficeRoomInfo($id){
$field = 'a.id,a.building_id,b.title,b.floor_total,a.price_total,a.price,a.station_start,b.type,a.station_end,a.area,a.floor,a.floor_tag, $field = 'a.id,a.building_id,b.title,b.province,b.city,b.disc,b.floor_total,a.price_total,a.price,a.station_start,b.type,a.station_end,a.area,a.floor,a.floor_tag,
a.is_register,a.age_limit_start,a.age_limit_end,a.rent_free,a.management_fee,a.slotting_fee,a.carport,a.enter_date, a.is_register,a.age_limit_start,a.age_limit_end,a.rent_free,a.management_fee,a.slotting_fee,a.carport,a.enter_date,
a.is_partition,a.decoration,a.payment_month,a.deposit_month,a.source,a.create_time,a.operation_id,a.landlord_remark, a.is_partition,a.decoration,a.payment_month,a.deposit_month,a.source,a.create_time,a.operation_id,a.landlord_remark,
a.fee_rule,a.update_time,b.address'; a.fee_rule,a.update_time,b.address,a.is_exclusive_type,a.agent_start_time,a.agent_end_time';
$result = $this->m_office_room->getOfficeRoomInfo($field, ['a.id'=>$id]);
$result = $this->m_office_room->getOfficeRoomInfo($field,['a.id'=>$id]);
if (!$result) { if (!$result) {
return ['status'=>101,'msg'=>'此房源不存在']; return ['status'=>101,'msg'=>'此房源不存在'];
} }
...@@ -615,10 +616,27 @@ class OfficeRoomService ...@@ -615,10 +616,27 @@ class OfficeRoomService
$result['room_num'] = $this->getRoomNum($result['id'],$result['id']); $result['room_num'] = $this->getRoomNum($result['id'],$result['id']);
//交通信息 //交通信息
$result['traffic_info'] = $this->getTrafficInfo($result['id']); $result['traffic_info'] = $this->getTrafficInfo($result['id']);
//参考均价
$result['reference_average_price'] = 5.2;
//楼盘图
$result['building_image'] = $this->getBuildingImage($result['building_id']);
return ['status'=>200,'msg'=>'success','data'=>$result]; return ['status'=>200,'msg'=>'success','data'=>$result];
} }
/**
* 楼盘图
* @param $id
* @return false|\PDOStatement|string|\think\Collection
*/
public function getBuildingImage($id){
$where['img_status'] = 0;
$where['house_id'] = $id;
$where['img_type'] = 0;
$house_img_data = $this->m_office_img->getListAll('id,img_name', $where);
return $house_img_data;
}
/** /**
* 轮播图 * 轮播图
* @param $id * @param $id
......
...@@ -334,11 +334,11 @@ class OfficeService ...@@ -334,11 +334,11 @@ class OfficeService
return ['status'=>101,'msg'=>'此办公楼不存在']; return ['status'=>101,'msg'=>'此办公楼不存在'];
} }
#轮播图 //轮播图
$result['carousel_image'] = $this->getCarouselImage($result['id']); $result['carousel_image'] = $this->getCarouselImage($result['id']);
#房源数 //房源数
$result['room_num'] = $this->getRoomNum($result['id']); $result['room_num'] = $this->getRoomNum($result['id']);
#交通信息 //交通信息
$result['traffic_info'] = $this->getTrafficInfo($result['id']); $result['traffic_info'] = $this->getTrafficInfo($result['id']);
return ['status'=>200,'msg'=>'success','data'=>$result]; return ['status'=>200,'msg'=>'success','data'=>$result];
......
...@@ -244,6 +244,7 @@ class OfficeGRoom extends BaseModel ...@@ -244,6 +244,7 @@ class OfficeGRoom extends BaseModel
->join('office_g_building b', 'a.building_id=b.id','left') ->join('office_g_building b', 'a.building_id=b.id','left')
->where($params) ->where($params)
->find(); ->find();
// dump($this->getLastSql());
return $result; return $result;
} }
......
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