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
303bb77f
Commit
303bb77f
authored
Aug 07, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d692de33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
28 deletions
+39
-28
UserLog.php
application/index/controller/UserLog.php
+39
-28
No files found.
application/index/controller/UserLog.php
View file @
303bb77f
<?php
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\index\service\OfficeUserLogService
;
use
app\index\service\UserLogService
;
...
...
@@ -12,8 +14,8 @@ use think\Request;
* Time : 2:23 PM
* Intro:
*/
class
UserLog
extends
Basic
{
class
UserLog
extends
Basic
{
private
$service_
;
private
$OfficeUserLogService
;
...
...
@@ -21,7 +23,7 @@ class UserLog extends Basic{
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
service_
=
new
UserLogService
();
$this
->
service_
=
new
UserLogService
();
$this
->
OfficeUserLogService
=
new
OfficeUserLogService
();
}
...
...
@@ -48,11 +50,11 @@ class UserLog extends Basic{
}
$user_id
=
$params
[
'user_id'
];
$agent_id
=
$params
[
'agent_id'
];
$result
=
$this
->
service_
->
userDetail
(
$user_id
,
$agent_id
,
$this
->
siteId
);
$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"
]);
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
$result
[
"msg"
]);
}
...
...
@@ -66,12 +68,14 @@ class UserLog extends Basic{
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
userLog
(){
public
function
userLog
()
{
$params
=
$this
->
params
;
/* $params = array(
"user_id" => 828,
"type" => 1,
"site_id" => 10001,
);*/
$checkResult
=
$this
->
validate
(
$params
,
"UserLogValidate.userLog"
);
...
...
@@ -79,18 +83,19 @@ class UserLog extends Basic{
return
$this
->
response
(
101
,
$checkResult
);
}
$user_id
=
$params
[
'user_id'
];
$type
=
$params
[
'type'
];
$user_id
=
$params
[
'user_id'
];
$site_id
=
$params
[
'site_id'
];
$type
=
$params
[
'type'
];
if
(
$params
[
'entrust_type'
]
==
1
)
{
$result
=
$this
->
OfficeUserLogService
->
userLog
(
$user_id
,
$this
->
siteId
,
$type
);
}
else
{
$result
=
$this
->
service_
->
userLog
(
$user_id
,
$this
->
siteId
,
$type
);
if
(
$params
[
'entrust_type'
]
==
1
)
{
$result
=
$this
->
OfficeUserLogService
->
userLog
(
$user_id
,
$site_id
,
$type
);
}
else
{
$result
=
$this
->
service_
->
userLog
(
$user_id
,
$site_id
,
$type
);
}
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
"请求数据为空"
);
}
...
...
@@ -100,12 +105,14 @@ class UserLog extends Basic{
* 电话跟进
* @return \think\Response
*/
public
function
followUpLogNew
(){
public
function
followUpLogNew
()
{
$params
=
$this
->
params
;
/* $params = array(
"user_id" => 828,
"page_no" => 1,
"site_id" => 10001,
"page_size" => 15
);*/
$checkResult
=
$this
->
validate
(
$params
,
"UserLogValidate.followUpLog"
);
...
...
@@ -114,18 +121,19 @@ class UserLog extends Basic{
}
$user_id
=
$params
[
'user_id'
];
$site_id
=
$params
[
'site_id'
];
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
if
(
isset
(
$params
[
'entrust_type'
])
&&
$params
[
'entrust_type'
]
==
1
)
{
if
(
isset
(
$params
[
'entrust_type'
])
&&
$params
[
'entrust_type'
]
==
1
)
{
return
$this
->
response
(
"101"
,
"请求数据空"
);
}
else
{
$result
=
$this
->
service_
->
phoneFollowUpNew
(
$user_id
,
$this
->
siteId
,
$pageNo
,
$pageSize
);
}
else
{
$result
=
$this
->
service_
->
phoneFollowUpNew
(
$user_id
,
$site_id
,
$pageNo
,
$pageSize
);
}
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
"请求数据为空"
);
}
}
...
...
@@ -134,12 +142,14 @@ class UserLog extends Basic{
* 电话跟进
* @return \think\Response
*/
public
function
followUpLog
(){
public
function
followUpLog
()
{
$params
=
$this
->
params
;
/* $params = array(
"user_id" => 828,
"page_no" => 1,
"site_id" => 10001,
"page_size" => 15
);*/
$checkResult
=
$this
->
validate
(
$params
,
"UserLogValidate.followUpLog"
);
...
...
@@ -148,18 +158,19 @@ class UserLog extends Basic{
}
$user_id
=
$params
[
'user_id'
];
$site_id
=
$params
[
'site_id'
];
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
if
(
isset
(
$params
[
'entrust_type'
])
&&
$params
[
'entrust_type'
]
==
1
)
{
$result
=
$this
->
OfficeUserLogService
->
phoneFollowUp
(
$user_id
,
$this
->
siteId
,
$pageNo
,
$pageSize
);
}
else
{
$result
=
$this
->
service_
->
phoneFollowUp
(
$user_id
,
$this
->
siteId
,
$pageNo
,
$pageSize
);
if
(
isset
(
$params
[
'entrust_type'
])
&&
$params
[
'entrust_type'
]
==
1
)
{
$result
=
$this
->
OfficeUserLogService
->
phoneFollowUp
(
$user_id
,
$site_id
,
$pageNo
,
$pageSize
);
}
else
{
$result
=
$this
->
service_
->
phoneFollowUp
(
$user_id
,
$site_id
,
$pageNo
,
$pageSize
);
}
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
"请求数据为空"
);
}
}
...
...
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