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
d48b3b48
Commit
d48b3b48
authored
Sep 04, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取商圈
parent
484ef8f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
Shop.php
application/api_broker/controller/Shop.php
+44
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Shop.php
View file @
d48b3b48
...
...
@@ -11,6 +11,7 @@ use app\index\validate\HouseValidate;
use
app\model\AAgents
;
use
app\model\ACollectHouse
;
use
app\model\AttentionModel
;
use
app\model\GBusinessDistrict
;
use
app\model\GHouses
;
use
app\model\GHousesExt
;
use
app\model\GHousesFollowUp
;
...
...
@@ -626,4 +627,47 @@ class Shop extends Basic
}
/**
* 获取全部商圈列表
*
* @return \think\Response
*/
public
function
getBusinessAll
()
{
$code
=
200
;
$msg
=
''
;
$where
[
'is_del'
]
=
0
;
if
(
$this
->
params
[
'name'
]
!=
NULL
)
{
$where
[
'name'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'name'
]
.
'%'
];
}
if
(
!
empty
(
$this
->
params
[
'province'
]))
{
$where
[
'province'
]
=
$this
->
params
[
'province'
];
}
if
(
empty
(
$this
->
params
[
'city'
]))
{
$where
[
'city'
]
=
'上海市'
;
}
else
{
$where
[
'city'
]
=
$this
->
params
[
'city'
];
}
if
(
!
empty
(
$this
->
params
[
'disc'
]))
{
$where
[
'disc'
]
=
$this
->
params
[
'disc'
];
}
$fields
=
'id,name,province,city,disc,status,create_time'
;
try
{
$auth_group
=
New
GBusinessDistrict
();
$data
=
$auth_group
->
getList
(
1
,
1000
,
'id desc'
,
$fields
,
$where
);
}
catch
(
\Exception
$e
)
{
$code
=
101
;
$msg
=
$e
->
getMessage
();
$data
=
[];
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
application/route.php
View file @
d48b3b48
...
...
@@ -527,6 +527,7 @@ Route::group('broker', [
'delHouseFile'
=>
[
'api_broker/shop/delHouseFile'
,
[
'method'
=>
'post'
]
],
//商铺文件删除
'getAddress'
=>
[
'api_broker/shop/getAddress'
,
[
'method'
=>
'get'
]
],
//获取江浙沪城市
'getRegions'
=>
[
'api_broker/shop/getRegions'
,
[
'method'
=>
'get'
]
],
//获取省市区
'getBusinessAll'
=>
[
'api_broker/shop/getBusinessAll'
,
[
'method'
=>
'get'
]
],
//获取商圈
'selectPerformanceByTime'
=>
[
'api_broker/Performance/selectPerformanceByTime'
,
[
'method'
=>
'get'
]
],
...
...
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