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
29ac4f47
Commit
29ac4f47
authored
Dec 06, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
最适合业态
parent
b45f35ae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
MapFindHouse.php
application/api_broker/controller/MapFindHouse.php
+5
-1
GBusinessDistrict.php
application/model/GBusinessDistrict.php
+2
-2
GHouses.php
application/model/GHouses.php
+1
-1
No files found.
application/api_broker/controller/MapFindHouse.php
View file @
29ac4f47
...
...
@@ -116,7 +116,11 @@ class MapFindHouse extends Basic
$result
=
$disc_arr
;
}
elseif
(
$params
[
"grade"
]
==
2
)
{
$businessModel
=
new
GBusinessDistrict
();
$result
=
$businessModel
->
getListByMap
(
$params
[
"city"
]);
$str
=
" a.city = '"
.
$params
[
"city"
]
.
"' "
;
if
(
$params
[
"source"
]
==
2
){
$str
.=
" and b.status = 1 and b.is_show = 0"
;
}
$result
=
$businessModel
->
getListByMap
(
$str
);
}
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
...
...
application/model/GBusinessDistrict.php
View file @
29ac4f47
...
...
@@ -34,10 +34,10 @@ class GBusinessDistrict extends BaseModel
return
$result
;
}
public
function
getListByMap
(
$
city
){
public
function
getListByMap
(
$
params
){
$sql
=
"select a.id,a.`name`,a.longitude,a.latitude,count(b.id) as num
from g_business_district as a left join g_houses as b on b.business_district_id=a.id
where
a.city='"
.
$city
.
"'
and a.longitude <> '' GROUP BY b.business_district_id HAVING num > 0"
;
where
$params
and a.longitude <> '' GROUP BY b.business_district_id HAVING num > 0"
;
return
$this
->
query
(
$sql
);
}
...
...
application/model/GHouses.php
View file @
29ac4f47
...
...
@@ -1611,7 +1611,7 @@ class GHouses extends BaseModel
->
where
(
$params
)
->
group
(
"a.disc"
)
->
select
();
//
echo $this->getLastSql();
echo
$this
->
getLastSql
();
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