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
c99bf73f
Commit
c99bf73f
authored
Jun 04, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b4447db5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
8 deletions
+24
-8
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+9
-2
OfficeService.php
application/index/service/OfficeService.php
+0
-6
OfficeGBuildingStations.php
application/model/OfficeGBuildingStations.php
+15
-0
No files found.
application/index/service/OfficeRoomService.php
View file @
c99bf73f
...
...
@@ -16,6 +16,7 @@ use app\model\AAgents;
use
app\model\GBusinessDistrict
;
use
app\model\OfficeACollectHouse
;
use
app\model\OfficeGBuilding
;
use
app\model\OfficeGBuildingStations
;
use
app\model\OfficeGImg
;
use
app\model\OfficeGLandlordPhone
;
use
app\model\OfficeGOperatingRecord
;
...
...
@@ -33,6 +34,8 @@ class OfficeRoomService
private
$agent_room
;
private
$landlord_phone
;
private
$internet_path
;
private
$m_building_stations
;
public
function
__construct
()
{
...
...
@@ -43,6 +46,8 @@ class OfficeRoomService
$this
->
agent
=
new
AAgents
();
$this
->
agent_room
=
new
OfficeGRoomToAgent
();
$this
->
landlord_phone
=
new
OfficeGLandlordPhone
();
$this
->
m_building_stations
=
new
OfficeGBuildingStations
();
if
(
CURRENT_URL
==
'https://api.tonglianjituan.com/'
)
{
$this
->
internet_path
=
IMAGES_URL
.
'/resource/lib/Attachments/images/'
;
...
...
@@ -729,8 +734,10 @@ class OfficeRoomService
* @return string
*/
public
function
getTrafficInfo
(
$id
){
$res
=
'8号线地铁站出站300米'
;
return
$res
;
$field
=
'b.line_name_simple,b.name,a.distance'
;
$res
=
$this
->
m_building_stations
->
getTrafficInfo
(
$field
,
[
'a.building_id'
=>
$id
]);
$res_str
=
"
{
$res
[
'line_name_simple'
]
}{
$res
[
'name'
]
}
地铁站出站
{
$res
[
'distance'
]
}
米"
;
return
$res_str
;
}
/**
...
...
application/index/service/OfficeService.php
View file @
c99bf73f
...
...
@@ -440,12 +440,6 @@ class OfficeService
return
$house_img_data
;
}
//交通信息
private
function
getTrafficInfo
(
$id
){
$res
=
'8号线地铁站出站300米'
;
return
$res
;
}
//房源数
private
function
getRoomNum
(
$id
){
$m_office_room
=
new
OfficeGRoom
();
...
...
application/model/OfficeGBuildingStations.php
View file @
c99bf73f
...
...
@@ -69,4 +69,19 @@ class OfficeGBuildingStations extends BaseModel
public
function
insertData
(
$data
){
return
$this
->
db_
->
insertAll
(
$data
);
}
/**
* 交通信息
* @param $field
* @param $where
* @return array|false|\PDOStatement|string|\think\Model
*/
public
function
getTrafficInfo
(
$field
,
$where
)
{
$where
[
'a.is_del'
]
=
0
;
return
$this
->
db_
->
alias
(
'a'
)
->
field
(
$field
)
->
join
(
'metro_stations b'
,
'a.stations_id=b.id'
,
'left'
)
->
where
(
$where
)
->
find
();
}
}
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