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
c7b52683
Commit
c7b52683
authored
Jul 11, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user_agent
parent
f2602ed3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
UserLog.php
application/index/controller/UserLog.php
+1
-1
UserLogService.php
application/index/service/UserLogService.php
+5
-9
No files found.
application/index/controller/UserLog.php
View file @
c7b52683
...
@@ -48,7 +48,7 @@ class UserLog extends Basic{
...
@@ -48,7 +48,7 @@ class UserLog extends Basic{
}
}
$user_id
=
$params
[
'user_id'
];
$user_id
=
$params
[
'user_id'
];
$agent_id
=
$params
[
'agent_id'
];
$agent_id
=
$params
[
'agent_id'
];
$result
=
$this
->
service_
->
userDetail
(
$user_id
,
$agent_id
);
$result
=
$this
->
service_
->
userDetail
(
$user_id
,
$agent_id
,
$this
->
siteId
);
if
(
$result
[
"code"
]
==
200
){
if
(
$result
[
"code"
]
==
200
){
return
$this
->
response
(
"200"
,
"success!"
,
$result
[
"data"
]);
return
$this
->
response
(
"200"
,
"success!"
,
$result
[
"data"
]);
...
...
application/index/service/UserLogService.php
View file @
c7b52683
...
@@ -17,6 +17,7 @@ use app\model\OReportModel;
...
@@ -17,6 +17,7 @@ use app\model\OReportModel;
use
app\model\ULabels
;
use
app\model\ULabels
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
use
app\model\UPhoneFollowUpTemporary
;
use
app\model\UserAgentModel
;
use
app\model\Users
;
use
app\model\Users
;
/**
/**
...
@@ -51,11 +52,12 @@ class UserLogService
...
@@ -51,11 +52,12 @@ class UserLogService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
userDetail
(
$user_id
,
$agent_id
)
public
function
userDetail
(
$user_id
,
$agent_id
,
$site_id
)
{
{
$redis_service
=
new
RedisCacheService
();
$redis_service
=
new
RedisCacheService
();
$user_service
=
new
UserService
();
$user_service
=
new
UserService
();
$vip_services
=
new
VipService
();
$vip_services
=
new
VipService
();
$m_user_agent
=
new
UserAgentModel
();
$user_arr
=
$redis_service
->
getRedisCache
(
1
,
$user_id
);
$user_arr
=
$redis_service
->
getRedisCache
(
1
,
$user_id
);
...
@@ -71,14 +73,8 @@ class UserLogService
...
@@ -71,14 +73,8 @@ class UserLogService
}
}
$user_arr
[
'user_pic'
]
=
HEADERIMGURL
.
$user_arr
[
'user_pic'
];
$user_arr
[
'user_pic'
]
=
HEADERIMGURL
.
$user_arr
[
'user_pic'
];
$agents_arr
=
$m_user_agent
->
getUserAgent
(
'c.name,c.phone'
,
[
'a.site_id'
=>
$site_id
,
'a.user_id'
=>
$user_id
]);
if
(
$user_arr
[
'agent_id'
])
{
if
(
$agents_arr
[
'agent_id'
])
{
$agents_arr
=
$redis_service
->
getRedisCache
(
2
,
$user_arr
[
'agent_id'
]);
if
(
empty
(
$agents_arr
))
{
$agents_arr
=
$this
->
agentModel
->
verifyUser
(
'name,phone'
,
''
,
[
'id'
=>
$user_arr
[
'agent_id'
]]);
}
$user_arr
[
'agent_info'
]
=
$agents_arr
?
$agents_arr
[
'name'
]
.
'-'
.
$agents_arr
[
'phone'
]
:
'未知'
;
$user_arr
[
'agent_info'
]
=
$agents_arr
?
$agents_arr
[
'name'
]
.
'-'
.
$agents_arr
[
'phone'
]
:
'未知'
;
}
else
{
}
else
{
$user_arr
[
'agent_info'
]
=
''
;
$user_arr
[
'agent_info'
]
=
''
;
...
...
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