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
26cf7b92
Commit
26cf7b92
authored
Dec 06, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地图找铺
parent
d0685195
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
MapFindHouse.php
application/api_broker/controller/MapFindHouse.php
+12
-1
Basic.php
application/api_broker/extend/Basic.php
+2
-0
GHouses.php
application/model/GHouses.php
+2
-3
No files found.
application/api_broker/controller/MapFindHouse.php
View file @
26cf7b92
...
@@ -52,6 +52,11 @@ class MapFindHouse extends Basic
...
@@ -52,6 +52,11 @@ class MapFindHouse extends Basic
return
$this
->
response
(
"101"
,
"坐标传入有误"
);
return
$this
->
response
(
"101"
,
"坐标传入有误"
);
}
}
$conditions
=
[];
$conditions
=
[];
$source
=
$params
[
"source"
];
if
(
$source
==
2
){
$conditions
[
'status'
]
=
array
(
'eq'
,
1
);
//只显示上架
$conditions
[
'is_show'
]
=
array
(
'eq'
,
0
);
//c端只显示可显示的楼盘
}
$conditions
[
"latitude"
]
=
array
(
"between"
,
array
(
$second_spot_arr
[
0
],
$first_spot_arr
[
0
]));
$conditions
[
"latitude"
]
=
array
(
"between"
,
array
(
$second_spot_arr
[
0
],
$first_spot_arr
[
0
]));
$conditions
[
"longitude"
]
=
array
(
"between"
,
array
(
$second_spot_arr
[
1
],
$first_spot_arr
[
1
]));
$conditions
[
"longitude"
]
=
array
(
"between"
,
array
(
$second_spot_arr
[
1
],
$first_spot_arr
[
1
]));
...
@@ -91,7 +96,13 @@ class MapFindHouse extends Basic
...
@@ -91,7 +96,13 @@ class MapFindHouse extends Basic
$disc_str
.=
$item
[
"name"
]
.
","
;
$disc_str
.=
$item
[
"name"
]
.
","
;
}
}
$disc_str
=
rtrim
(
$disc_str
,
","
);
$disc_str
=
rtrim
(
$disc_str
,
","
);
$shop_arr
=
$this
->
gHousesModel
->
getHouseNumByDisc
(
$disc_str
);
$params
[
"a.disc"
]
=
array
(
"in"
,
$disc_str
);
if
(
$params
[
"source"
]
==
2
){
$params
[
'a.status'
]
=
array
(
'eq'
,
1
);
//只显示上架
$params
[
'a.is_show'
]
=
array
(
'eq'
,
0
);
//c端只显示可显示的楼盘
}
$shop_arr
=
$this
->
gHousesModel
->
getHouseNumByDisc
(
$params
);
$disc_arr
=
[];
$disc_arr
=
[];
foreach
(
$disc
as
$key
=>
$item
)
{
foreach
(
$disc
as
$key
=>
$item
)
{
foreach
(
$shop_arr
as
$i
=>
$j
)
{
foreach
(
$shop_arr
as
$i
=>
$j
)
{
...
...
application/api_broker/extend/Basic.php
View file @
26cf7b92
...
@@ -60,6 +60,8 @@ class Basic extends Controller
...
@@ -60,6 +60,8 @@ class Basic extends Controller
"broker/addUserCallAgentV2"
,
"broker/addUserCallAgentV2"
,
"broker/addSpreadUser"
,
"broker/addSpreadUser"
,
"broker/getVolume"
,
"broker/getVolume"
,
"broker/getCityInfoByMap"
,
"broker/getShopListByMap"
,
);
);
/**
/**
...
...
application/model/GHouses.php
View file @
26cf7b92
...
@@ -1598,14 +1598,13 @@ class GHouses extends BaseModel
...
@@ -1598,14 +1598,13 @@ class GHouses extends BaseModel
}
}
/**
/**
* @param $
disc_str
* @param $
params
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
getHouseNumByDisc
(
$disc_str
){
public
function
getHouseNumByDisc
(
$params
){
$params
[
"a.disc"
]
=
array
(
"in"
,
$disc_str
);
$result
=
Db
::
table
(
$this
->
table
)
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
"a.id,a.disc,count(1) as num"
)
->
field
(
"a.id,a.disc,count(1) as num"
)
->
alias
(
"a"
)
->
alias
(
"a"
)
...
...
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