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
295dd597
Commit
295dd597
authored
Jun 12, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
带看动态
parent
a42687e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
User.php
application/api_broker/controller/User.php
+7
-1
OfficeUserLogService.php
application/index/service/OfficeUserLogService.php
+35
-1
No files found.
application/api_broker/controller/User.php
View file @
295dd597
...
@@ -833,7 +833,13 @@ class User extends Basic
...
@@ -833,7 +833,13 @@ class User extends Basic
}
}
$user_id
=
$params
[
'user_id'
];
$user_id
=
$params
[
'user_id'
];
$type
=
$params
[
'type'
];
$type
=
$params
[
'type'
];
$result
=
$this
->
userLogService
->
userLog
(
$user_id
,
$this
->
siteId
,
$type
);
if
(
isset
(
$params
[
'entrust_type'
])
&&
(
$params
[
'entrust_type'
]
==
1
)){
$result
=
$this
->
OfficeUserLogService
->
userLog
(
$user_id
,
$this
->
siteId
,
$type
);
}
else
{
$result
=
$this
->
userLogService
->
userLog
(
$user_id
,
$this
->
siteId
,
$type
);
}
if
(
count
(
$result
)
>
0
){
if
(
count
(
$result
)
>
0
){
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
...
...
application/index/service/OfficeUserLogService.php
View file @
295dd597
...
@@ -4,6 +4,7 @@ namespace app\index\service;
...
@@ -4,6 +4,7 @@ namespace app\index\service;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\OfficeOrderLogService
;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\VipService
;
use
app\api_broker\service\VipService
;
...
@@ -33,7 +34,7 @@ class OfficeUserLogService
...
@@ -33,7 +34,7 @@ class OfficeUserLogService
{
{
$this
->
agentModel
=
new
AAgents
();
$this
->
agentModel
=
new
AAgents
();
$this
->
userModel
=
new
Users
();
$this
->
userModel
=
new
Users
();
$this
->
orderService
=
new
OrderLogService
();
$this
->
orderService
=
new
O
fficeO
rderLogService
();
}
}
...
@@ -86,4 +87,36 @@ class OfficeUserLogService
...
@@ -86,4 +87,36 @@ class OfficeUserLogService
}
}
/**
* 客户动态
* @param $user_id
* @param $site_id
* @param $type 1表示查最近的一条跟进,2查所有的订单更近
* @return false|mixed|null|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
userLog
(
$user_id
,
$site_id
,
$type
)
{
$result
=
$this
->
orderService
->
selectListByUserIdAndSiteId
(
$user_id
,
''
,
$site_id
);
switch
(
$type
){
case
1
:
if
(
count
(
$result
)
>
0
){
return
$result
[
0
];
}
else
{
return
null
;
}
case
2
:
return
$result
;
default
:
return
null
;
break
;
}
}
}
}
\ No newline at end of file
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