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
df4313bf
Commit
df4313bf
authored
Jan 04, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取电话跟进标签列表
parent
43c5d008
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
12 deletions
+38
-12
User.php
application/api_broker/controller/User.php
+16
-3
Basic.php
application/api_broker/extend/Basic.php
+1
-0
UserLogService.php
application/index/service/UserLogService.php
+8
-7
ULabels.php
application/model/ULabels.php
+10
-1
route.php
application/route.php
+3
-1
No files found.
application/api_broker/controller/User.php
View file @
df4313bf
...
@@ -10,6 +10,7 @@ use app\api_broker\service\VipService;
...
@@ -10,6 +10,7 @@ use app\api_broker\service\VipService;
use
app\index\service\UserLogService
;
use
app\index\service\UserLogService
;
use
app\index\service\UserService
;
use
app\index\service\UserService
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\ULabels
;
use
app\model\UPhoneFollowPp
;
use
app\model\UPhoneFollowPp
;
use
app\model\Users
;
use
app\model\Users
;
use
think\Log
;
use
think\Log
;
...
@@ -35,6 +36,18 @@ class User extends Basic
...
@@ -35,6 +36,18 @@ class User extends Basic
}
}
/**
* 获取电话跟进标签列表
* @return \think\Response
*/
public
function
getUserLabels
()
{
$m_lables
=
New
ULabels
;
$field
=
'id as labels_id,name'
;
$where
[
'type'
]
=
1
;
$result
=
$m_lables
->
getLabelsList
(
$field
,
$where
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
/**
/**
* 客户搜索条件
* 客户搜索条件
* @return \think\Response
* @return \think\Response
...
@@ -723,7 +736,7 @@ class User extends Basic
...
@@ -723,7 +736,7 @@ class User extends Basic
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
=
array
(
$params
=
array
(
"user_id"
=>
828
,
"user_id"
=>
187
,
"agent_id"
=>
1
,
"agent_id"
=>
1
,
);
);
...
@@ -737,8 +750,8 @@ class User extends Basic
...
@@ -737,8 +750,8 @@ class User extends Basic
$s_index_user
=
new
UserService
();
$s_index_user
=
new
UserService
();
$result
[
'user_bind_list'
]
=
$s_index_user
->
userBindInfo
(
$params
[
'user_id'
]);
$result
[
'user_bind_list'
]
=
$s_index_user
->
userBindInfo
(
$params
[
'user_id'
]);
if
(
$result
[
"code"
]
==
200
){
if
(
$result
){
return
$this
->
response
(
"200"
,
"success!"
,
$result
[
"data"
]
);
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
}
...
...
application/api_broker/extend/Basic.php
View file @
df4313bf
...
@@ -62,6 +62,7 @@ class Basic extends Controller
...
@@ -62,6 +62,7 @@ class Basic extends Controller
"broker/getVolume"
,
"broker/getVolume"
,
"broker/getCityInfoByMap"
,
"broker/getCityInfoByMap"
,
"broker/getShopListByMap"
,
"broker/getShopListByMap"
,
"broker/getUserLabels"
,
);
);
/**
/**
...
...
application/index/service/UserLogService.php
View file @
df4313bf
...
@@ -220,17 +220,18 @@ class UserLogService
...
@@ -220,17 +220,18 @@ class UserLogService
{
{
//查询客户详情
//查询客户详情
$field
=
'id,user_pic,name,phone,site_ids,agent_id'
;
$field
=
'id as user_id,user_pic,user_nick,user_name,user_phone,site_ids,agent_id'
;
$user_res
=
$this
->
userModel
->
getUserDetailStreamline
(
$user_id
,
$field
);
$result
=
$this
->
userModel
->
getUserDetailStreamline
(
$user_id
,
$field
);
if
(
count
(
$user_res
)
<=
0
)
{
if
(
count
(
$result
)
<=
0
)
{
return
[
"code"
=>
101
,
"msg"
=>
"没找到此条用户信息"
];
return
[
"code"
=>
101
,
"msg"
=>
"没找到此条用户信息"
];
}
}
$
user_res
[
'user_pic'
]
=
HEADERIMGURL
.
$user_res
[
'user_pic'
];
$
result
[
'user_pic'
]
=
HEADERIMGURL
.
$result
[
'user_pic'
];
$result
[
'agent_path'
]
=
AGENTHEADERIMGURL
;
$result
[
'agent_path'
]
=
AGENTHEADERIMGURL
;
/*查询站点名*/
/*查询站点名*/
$site_model
=
new
ASite
();
$site_model
=
new
ASite
();
foreach
(
explode
(
','
,
$
user_res
[
'site_ids'
])
as
$site_k
=>
$site_v
)
{
foreach
(
explode
(
','
,
$
result
[
'site_ids'
])
as
$site_k
=>
$site_v
)
{
$site_field
=
'city'
;
$site_field
=
'city'
;
$site_params
[
'id'
]
=
$site_v
;
$site_params
[
'id'
]
=
$site_v
;
$site_model
=
$site_model
->
findByOne
(
$site_field
,
$site_params
);
$site_model
=
$site_model
->
findByOne
(
$site_field
,
$site_params
);
...
@@ -273,13 +274,13 @@ class UserLogService
...
@@ -273,13 +274,13 @@ class UserLogService
$model
=
new
AAgents
();
$model
=
new
AAgents
();
$agent_res
=
$model
->
searchAgentsByKeyword
(
"id,name,phone"
,
[
"id"
=>
$agent_id
]);
$agent_res
=
$model
->
searchAgentsByKeyword
(
"id,name,phone"
,
[
"id"
=>
$agent_id
]);
$call
=
new
CallPhoneService
();
$call
=
new
CallPhoneService
();
$bind_num_res
=
$call
->
getBindNum
(
$
user_res
[
'user_phone'
],
$agent_res
[
0
][
'phone'
]);
$bind_num_res
=
$call
->
getBindNum
(
$
result
[
'user_phone'
],
$agent_res
[
0
][
'phone'
]);
if
(
$bind_num_res
!=
0
)
{
if
(
$bind_num_res
!=
0
)
{
$result
[
'is_outpace_call_num'
]
=
0
;
$result
[
'is_outpace_call_num'
]
=
0
;
}
}
//查询当前经纪人是否是某个客方的总监 0:可查看 1:不可查看
//查询当前经纪人是否是某个客方的总监 0:可查看 1:不可查看
$result
[
'is_can_look'
]
=
$user_service
->
isUserAgentDirector
(
$
user_res
[
"agent_id"
],
$agent_id
);
$result
[
'is_can_look'
]
=
$user_service
->
isUserAgentDirector
(
$
result
[
"agent_id"
],
$agent_id
);
$vip_services
=
new
VipService
();
$vip_services
=
new
VipService
();
//是否可以查看vip客户 0:可查看 1:不可查看
//是否可以查看vip客户 0:可查看 1:不可查看
$result
[
'examine_vip'
]
=
$vip_services
->
vip
(
$agent_id
);
$result
[
'examine_vip'
]
=
$vip_services
->
vip
(
$agent_id
);
...
...
application/model/ULabels.php
View file @
df4313bf
...
@@ -25,7 +25,6 @@ class ULabels extends BaseModel
...
@@ -25,7 +25,6 @@ class ULabels extends BaseModel
*/
*/
public
function
uleList
(
$where
)
public
function
uleList
(
$where
)
{
{
$r
=
$this
->
db_
->
where
(
$where
)
->
select
();
$r
=
$this
->
db_
->
where
(
$where
)
->
select
();
return
$r
;
return
$r
;
}
}
...
@@ -78,4 +77,14 @@ class ULabels extends BaseModel
...
@@ -78,4 +77,14 @@ class ULabels extends BaseModel
->
column
(
$field
);
->
column
(
$field
);
}
}
public
function
getLabelsList
(
$field
,
$where
)
{
return
$this
->
db_
->
where
(
$where
)
->
field
(
$field
)
->
select
();
}
}
}
application/route.php
View file @
df4313bf
...
@@ -601,7 +601,8 @@ Route::group('broker', [
...
@@ -601,7 +601,8 @@ Route::group('broker', [
'agentUserTb'
=>
[
'api_broker/Client/agentUserTb'
,
[
'method'
=>
'get'
]],
//客户列表
'agentUserTb'
=>
[
'api_broker/Client/agentUserTb'
,
[
'method'
=>
'get'
]],
//客户列表
'agentUserFollow'
=>
[
'api_broker/Client/agentUserFollow'
,
[
'method'
=>
'get'
]],
//客户列表
'agentUserFollow'
=>
[
'api_broker/Client/agentUserFollow'
,
[
'method'
=>
'get'
]],
//客户列表
'agentSearch'
=>
[
'api_broker/Client/agentSearch'
,
[
'method'
=>
'get'
]],
//经纪人搜索
'agentSearch'
=>
[
'api_broker/Client/agentSearch'
,
[
'method'
=>
'get'
]],
//经纪人搜索
'getULabelsListApp'
=>
[
'api_broker/Client/getULabelsListApp'
,
[
'method'
=>
'get'
]],
//客户标签
'getULabelsListApp'
=>
[
'api_broker/Client/getULabelsListApp'
,
[
'method'
=>
'get|post'
]],
//客户标签
'getULabelsList'
=>
[
'api_broker/Client/getULabelsListApp'
,
[
'method'
=>
'get|post'
]],
//客户标签
'all_user'
=>
[
'api_broker/Client/all_user'
,
[
'method'
=>
'post|get'
]],
//全部客户 朱伟
'all_user'
=>
[
'api_broker/Client/all_user'
,
[
'method'
=>
'post|get'
]],
//全部客户 朱伟
'inviteList'
=>
[
'api_broker/Client/inviteList'
,
[
'method'
=>
'get'
]],
//邀请记录
'inviteList'
=>
[
'api_broker/Client/inviteList'
,
[
'method'
=>
'get'
]],
//邀请记录
//商铺
//商铺
...
@@ -752,6 +753,7 @@ Route::group('broker', [
...
@@ -752,6 +753,7 @@ Route::group('broker', [
'adjustment'
=>
[
'api_broker/PayLog/adjustment'
,
[
'method'
=>
'get|post'
]],
'adjustment'
=>
[
'api_broker/PayLog/adjustment'
,
[
'method'
=>
'get|post'
]],
//原生客户详情
//原生客户详情
'getUserLabels'
=>
[
'api_broker/User/getUserLabels'
,
[
'method'
=>
'get|post'
]],
//获取电话跟进标签列表
'userDetail'
=>
[
'api_broker/User/userDetail'
,
[
'method'
=>
'get|post'
]],
//
'userDetail'
=>
[
'api_broker/User/userDetail'
,
[
'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