Commit d48b3b48 authored by hujun's avatar hujun

获取商圈

parent 484ef8f2
......@@ -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);
}
}
......@@ -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' ] ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment