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
392b8387
Commit
392b8387
authored
Nov 01, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
528540b2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
10 deletions
+18
-10
Houses.php
application/index/controller/Houses.php
+3
-1
Member.php
application/index/controller/Member.php
+3
-1
BrokerService.php
application/index/service/BrokerService.php
+5
-2
ASite.php
application/model/ASite.php
+6
-5
route.php
application/route.php
+1
-1
No files found.
application/index/controller/Houses.php
View file @
392b8387
...
...
@@ -415,7 +415,9 @@ class Houses extends Basic
if
(
!
empty
(
$this
->
params
[
'site_id'
]))
{
$service_broker
=
new
BrokerService
();
$check_data
=
$service_broker
->
checkSite
(
$this
->
userId
,
$this
->
params
[
'site_id'
]);
if
(
!
$check_data
)
{
if
(
$check_data
)
{
$where
[
'city'
]
=
$this
->
params
[
'site_id'
];
}
else
{
$where
[
'city'
]
=
$this
->
city
;
}
}
...
...
application/index/controller/Member.php
View file @
392b8387
...
...
@@ -297,7 +297,9 @@ class Member extends Basic{
if
(
!
empty
(
$this
->
params
[
'site_id'
]))
{
$service_broker
=
new
BrokerService
();
$check_data
=
$service_broker
->
checkSite
(
$this
->
userId
,
$this
->
params
[
'site_id'
]);
if
(
!
$check_data
)
{
if
(
$check_data
)
{
$where
[
'city'
]
=
$this
->
params
[
'a.site_id'
];
}
else
{
$where
[
'city'
]
=
$this
->
city
;
}
}
...
...
application/index/service/BrokerService.php
View file @
392b8387
...
...
@@ -267,7 +267,10 @@ class BrokerService
*
* @param $agent_id
* @param int $site_id
* @return array|bool|mixed
* @return array|bool|false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
checkSite
(
$agent_id
,
$site_id
=
0
)
{
$city
=
[];
...
...
@@ -286,7 +289,7 @@ class BrokerService
$site_id
=
$m_group_site
->
getGroupSite
(
'site_id'
,
$where
);
if
(
$site_id
[
'status'
]
!=
'fail'
&&
!
empty
(
$site_id
[
'data'
][
'site_id'
]))
{
$city
=
$m_site
->
getSiteById
Column
(
$site_id
[
'data'
][
'site_id'
],
'id,city'
);
$city
=
$m_site
->
getSiteById
List
(
$site_id
[
'data'
][
'site_id'
],
'id,city'
);
}
if
(
empty
(
$city
))
{
...
...
application/model/ASite.php
View file @
392b8387
...
...
@@ -76,15 +76,16 @@ class ASite extends BaseModel
}
/**
* 根据id获取单个字段值
*
* @param $id
* @param $fields
* @return mixed
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getSiteById
Column
(
$id
,
$fields
)
public
function
getSiteById
List
(
$id
,
$fields
)
{
$return
=
$this
->
where
(
'id'
,
'in'
,
$id
)
->
column
(
$fields
);
$return
=
$this
->
field
(
$fields
)
->
where
(
'id'
,
'in'
,
$id
)
->
select
(
);
return
$return
;
}
...
...
application/route.php
View file @
392b8387
...
...
@@ -366,7 +366,6 @@ Route::group('api', [
'appraiser'
=>
[
'api/broker/appraiser'
,
[
'method'
=>
'post'
]
],
//评价经纪人
'recordCallNum'
=>
[
'api/broker/recordCallNum'
,
[
'method'
=>
'post'
]
],
//记录拨打经纪人号码
'recordCallNumShare'
=>
[
'api/broker/recordCallNumShare'
,
[
'method'
=>
'post'
]
],
//记录拨打经纪人号码
'getAgentGroupSite'
=>
[
'api/broker/getAgentGroupSite'
,
[
'method'
=>
'GET'
]
],
//获得经纪人站点城市
//get member
'logout'
=>
[
'api/member/logout'
,
[
'method'
=>
'get'
]
],
...
...
@@ -521,6 +520,7 @@ Route::group('broker', [
'uploadHeadImg'
=>
[
'api_broker/Broker/uploadHeadImg'
,
[
'method'
=>
'post'
]
],
//经纪人上传头像
'editClient'
=>
[
'api_broker/Client/editClient'
,
[
'method'
=>
'get|post'
]
],
//添加和编辑客户
'getBroker'
=>
[
'api_broker/broker/getBroker'
,
[
'method'
=>
'get'
]
],
//获取经纪人列表
'getAgentGroupSite'
=>
[
'api_broker/broker/getAgentGroupSite'
,
[
'method'
=>
'get'
]
],
//获得经纪人站点
'labelEdit'
=>
[
'api_broker/label/index'
,
[
'method'
=>
'get|post'
]
],
//编辑标签
'getLabelsList'
=>
[
'api_broker/label/getLabelsList'
,
[
'method'
=>
'get'
]
],
//标签列表
'add_phone_follow_up'
=>
[
'api_broker/broker/add_phone_follow_up'
,
[
'method'
=>
'get|post'
]
],
//新增-客户电话跟进
...
...
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