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
c08d5e79
Commit
c08d5e79
authored
Jan 10, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电话跟进
parent
0a3e1dc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
0 deletions
+85
-0
PhoneFollowUp.php
application/index/service/PhoneFollowUp.php
+85
-0
No files found.
application/index/service/PhoneFollowUp.php
0 → 100644
View file @
c08d5e79
<?php
/**
* Created by PhpStorm.
* User: 43897
* Date: 2019/1/10
* Time: 13:51
*/
namespace
app\index\service
;
use
app\model\AAgents
;
use
app\model\UPhoneFollowUp
;
class
PhoneFollowUp
{
private
$phone_follow_up
;
public
function
__construct
(
$site_id
)
{
$this
->
phone_follow_up
=
new
UPhoneFollowUp
(
$site_id
);
}
/**
* @param string $start_time
* @param string $end_time
* @param array $params
* @param string $field
* @return array|bool|false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getPhoneFollowList
(
string
$start_time
,
string
$end_time
,
array
$params
,
$field
=
'id,user_id,create_time,content,user_status,labels_id,agent_id'
)
{
if
(
empty
(
$start_time
)
||
empty
(
$end_time
))
{
return
false
;
}
else
{
$where
[
'create_time'
]
=
[
'between'
,
[
$start_time
.
' 00:00:00'
,
$end_time
.
' 23:59:59'
]];
}
$data
=
[];
if
(
isset
(
$params
[
'user_id'
]))
{
$where
[
'user_id'
]
=
$params
[
'user_id'
];
}
if
(
isset
(
$params
[
'agent_id'
]))
{
$where
[
'agent_id'
]
=
$params
[
'agent_id'
];
}
if
(
!
empty
(
$params
[
'store_id'
]))
{
$agent_where
[
'store_id'
]
=
$params
[
'remark_store_id'
];
}
if
(
!
empty
(
$params
[
'district_id'
]))
{
$agent_where
[
'district_id'
]
=
$params
[
'district_id'
];
}
$page_no
=
isset
(
$params
[
'page_no'
])
?
$params
[
'page_no'
]
:
1
;
$page_size
=
isset
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
15
;
unset
(
$params
[
'page_no'
]);
unset
(
$params
[
'page_size'
]);
if
(
!
empty
(
$agent_where
))
{
$m_agent
=
new
AAgents
();
$agent_id
=
$m_agent
->
getAgentsByWhereColumn
(
$agent_where
,
'id'
);
if
(
empty
(
$agent_id
))
{
return
$data
;
}
else
{
$where
[
'agent_id'
]
=
[
'in'
,
$agent_id
];
}
}
if
(
$start_time
==
$end_time
&&
date
(
'Y-m-d'
,
strtotime
(
$start_time
))
==
date
(
'Y-m-d'
))
{
}
else
{
$data
=
$this
->
phone_follow_up
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
'id desc'
,
$field
,
$where
);
}
return
$data
;
}
}
\ 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