Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
dd05ef6a
Commit
dd05ef6a
authored
Jun 03, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e403b707
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
6 deletions
+25
-6
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+21
-3
OfficeService.php
application/index/service/OfficeService.php
+3
-3
OfficeGRoom.php
application/model/OfficeGRoom.php
+1
-0
No files found.
application/index/service/OfficeRoomService.php
View file @
dd05ef6a
...
@@ -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
...
...
application/index/service/OfficeService.php
View file @
dd05ef6a
...
@@ -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
];
...
...
application/model/OfficeGRoom.php
View file @
dd05ef6a
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment