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
30a62a2e
Commit
30a62a2e
authored
Apr 03, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户列表优化
parent
c2f3bf05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
Member.php
application/index/controller/Member.php
+13
-5
Users.php
application/model/Users.php
+5
-1
No files found.
application/index/controller/Member.php
View file @
30a62a2e
...
...
@@ -3,6 +3,7 @@
namespace
app\index\controller
;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\VipService
;
use
app\extra\RedisExt
;
use
app\index\extend\Basic
;
...
...
@@ -340,6 +341,7 @@ class Member extends Basic{
$user_follow
=
new
UPhoneFollowUp
(
$this
->
siteId
);
$m_user
=
new
Users
();
$m_agent
=
new
AAgents
();
$redis_cache
=
new
RedisCacheService
();
foreach
(
$return_user_list
as
$k
=>
$v
)
{
if
(
$v
[
'user_pic'
])
{
...
...
@@ -360,12 +362,18 @@ class Member extends Basic{
if
(
empty
(
$v
[
'agent_id'
]))
{
$return_user_list
[
$k
][
'agent_name'
]
=
''
;
}
else
{
$return_user_list
[
$k
][
'agent_name'
]
=
$m_agent
->
getAgentsByWhere
([
'id'
=>
$v
[
'agent_id'
]],
'name'
);
$agent_data
=
$redis_cache
->
getRedisCache
(
2
,
$v
[
'agent_id'
]);
if
(
empty
(
$agent_data
))
{
$agent_name
=
$m_agent
->
getAgentsByWhere
([
'id'
=>
$v
[
'agent_id'
]],
'name'
);
}
else
{
$agent_name
=
$agent_data
[
'name'
];
}
$return_user_list
[
$k
][
'agent_name'
]
=
$agent_name
;
}
$params_
[
'user_id'
]
=
$v
[
'id'
];
$res
=
$user_follow
->
getPhoneFollowData
(
'create_time'
,
$params_
,
'id desc'
);
$return_user_list
[
$k
][
'follow_time'
]
=
$res
[
0
][
'create_time'
];
//
$params_['user_id'] = $v['id'];
//
$res = $user_follow->getPhoneFollowData('create_time', $params_, 'id desc');
//
$return_user_list[$k]['follow_time'] = $res[0]['create_time'];
$return_user_list
[
$k
][
'user_phone'
]
=
hide_customer_phone
(
$return_user_list
[
$k
][
'user_phone'
]);
$return_user_list
[
$k
][
'current_agent_id'
]
=
$this
->
userId
;
...
...
@@ -398,7 +406,7 @@ class Member extends Basic{
$return_user_list
[
$k
][
'is_outpace_call_num'
]
=
$is_outpace_call_num
;
/*end*/
$return_user_list
[
$k
][
'is_can_look'
]
=
$user_service
->
isUserAgentDirector
(
$v
[
"agent_id"
],
$this
->
agent
Id
);
$return_user_list
[
$k
][
'is_can_look'
]
=
$user_service
->
isUserAgentDirector
(
$v
[
"agent_id"
],
$this
->
user
Id
);
$is_show
=
true
;
if
(
$if_search_user
){
...
...
application/model/Users.php
View file @
30a62a2e
...
...
@@ -185,7 +185,11 @@ class Users extends Model
if
(
empty
(
$res
))
{
$res
=
$s_phone_follow_up
->
getPhoneFollowData
(
'create_time'
,
$params_
,
$order
);
}
$data
[
$k
][
'follow_time'
]
=
$res
[
0
][
'create_time'
];
if
(
empty
(
$res
[
0
][
'create_time'
]))
{
$data
[
$k
][
'follow_time'
]
=
''
;
}
else
{
$data
[
$k
][
'follow_time'
]
=
$res
[
0
][
'create_time'
];
}
}
return
$data
;
}
...
...
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