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
a4316134
Commit
a4316134
authored
Jun 06, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纬度
parent
29404fc1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
OfficeService.php
application/index/service/OfficeService.php
+3
-8
OfficeGBuildingStations.php
application/model/OfficeGBuildingStations.php
+11
-0
No files found.
application/index/service/OfficeService.php
View file @
a4316134
...
...
@@ -71,17 +71,12 @@ class OfficeService
//新增周边交通
if
(
!
empty
(
$data
[
'add_building_stations'
]))
{
$position_service
=
new
PositionService
();
//全部地铁站
$building_station_id
=
$this
->
m_building_stations
->
getFindDataColumn
(
'stations_id'
,
[
'building_id'
=>
$id
]);
$first_position
=
$data
[
'latitude'
]
.
','
.
$data
[
'longitude'
];
$add_building_stations
=
json_decode
(
$data
[
'add_building_stations'
],
true
);
foreach
(
$add_building_stations
as
$k
=>
$v
)
{
if
(
empty
(
$v
[
'stations_id'
]))
{
continue
;
}
$where
[
'building_id'
]
=
$id
;
$where
[
'stations_id'
]
=
$v
[
'stations_id'
];
$building_station_id
=
$this
->
m_building_stations
->
getFindData
(
'id'
,
$where
);
if
(
isset
(
$building_station_id
[
'id'
]))
{
if
(
empty
(
$v
[
'stations_id'
])
||
in_array
(
$v
[
'stations_id'
],
$building_station_id
))
{
continue
;
}
$save_stations
[
$k
][
'building_id'
]
=
$id
;
...
...
application/model/OfficeGBuildingStations.php
View file @
a4316134
...
...
@@ -32,6 +32,17 @@ class OfficeGBuildingStations extends BaseModel
->
find
();
}
/**
* @param $field
* @param $where
* @return array|false|\PDOStatement|string|\think\Model
*/
public
function
getFindDataColumn
(
$field
,
$where
)
{
$where
[
'is_del'
]
=
0
;
return
$this
->
db_
->
where
(
$where
)
->
column
(
$field
);
}
/**
* @param $field
* @param $where
...
...
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