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
3fff4fd2
Commit
3fff4fd2
authored
Oct 26, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
6f90c08a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
BatchProcessing.php
application/index/controller/BatchProcessing.php
+5
-3
No files found.
application/index/controller/BatchProcessing.php
View file @
3fff4fd2
...
...
@@ -3,6 +3,7 @@
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\index\service\HouseService
;
use
app\model\GBusinessDistrict
;
use
think\Log
;
...
...
@@ -27,6 +28,8 @@ class BatchProcessing extends Basic
public
function
getCityLatAadLng
(){
$model
=
new
GBusinessDistrict
();
$house_service
=
new
HouseService
();
$field
=
'id,name,city'
;
$get_params
=
''
;
$model_res
=
$model
->
getBusinessDistrict
(
$field
,
$get_params
);
...
...
@@ -39,16 +42,15 @@ class BatchProcessing extends Basic
$id
=
$v
[
'id'
];
$address
=
$v
[
'name'
];
$city
=
$v
[
'city'
];
$res
=
$this
->
getLatLng
(
$address
,
$city
);
/*获取商圈经纬度*/
$res
=
$house_service
->
getLatLng
(
$address
,
$city
);
if
(
$res
){
$success_num
++
;
$longitude
=
$res
[
'lng'
];
//'经度'
$latitude
=
$res
[
'lat'
];
//'维度'
}
else
{
$fail
++
;
$longitude
=
''
;
//'经度'
$latitude
=
''
;
//'维度'
$log_text
=
'商圈:'
.
$v
[
'name'
]
.
' 城市: '
.
$v
[
'city'
]
.
' 数据库ID: '
.
$id
;
...
...
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