Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
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
方斌
51business
Commits
1389d39b
Commit
1389d39b
authored
Apr 26, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
house rental fix
parent
2f1b3c77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
rental_house.js
app/service/house/rental_house.js
+9
-6
No files found.
app/service/house/rental_house.js
View file @
1389d39b
...
...
@@ -135,20 +135,23 @@ class RentalHouseService extends Service {
const
collection
=
await
ctx
.
service
.
house
.
collection
.
getCollection
(
collectionFilter
);
ctx
.
service
.
house
.
footPrint
.
addFootPrint
({
id
:
rental_house_id
,
type
:
2
});
//添加用户足迹记录
const
city_name
=
await
ctx
.
blockModel
.
City
.
one
({
where
:
{
code
:
house_basic_result
.
residential
.
city
}
});
const
county_name
=
await
ctx
.
blockModel
.
District
.
one
({
where
:
{
code
:
house_basic_result
.
residential
.
county
}
});
const
region_name
=
await
ctx
.
blockModel
.
Bizcircle
.
one
({
where
:
{
code
:
house_basic_result
.
residential
.
region
}
});
const
city
=
await
ctx
.
blockModel
.
City
.
one
({
where
:
{
code
:
house_basic_result
.
residential
.
city
}
});
const
county
=
await
ctx
.
blockModel
.
HouseDistrict
.
one
({
where
:
{
id
:
house_basic_result
.
residential
.
county
}
});
const
region
=
await
ctx
.
blockModel
.
HouseBizcircle
.
one
({
where
:
{
id
:
house_basic_result
.
residential
.
region
}
});
const
city_name
=
city
.
name
?
city
.
name
:
''
;
const
county_name
=
county
.
name
?
county
.
name
:
''
;
const
region_name
=
region
.
name
?
region
.
name
:
''
;
let
address
=
city_name
+
county_name
+
region_name
+
house_basic
.
address
;
let
gps_result
=
await
ctx
.
helper
.
getGPS
(
address
,
city_name
);
if
(
!
gps_result
)
{
if
(
!
gps_result
)
{
address
=
city_name
+
county_name
+
region_name
;
await
ctx
.
helper
.
getGPS
(
address
,
city_name
);
}
let
longitude
=
0
;
let
latitude
=
0
;
if
(
gps_result
)
{
longitude
=
gps_result
.
l
ocation
.
l
ng
;
latitude
=
gps_result
.
l
ocation
.
l
at
;
longitude
=
gps_result
.
lng
;
latitude
=
gps_result
.
lat
;
}
house_basic
.
longitude
=
longitude
;
house_basic
.
latitude
=
latitude
;
...
...
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