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
103434cd
Commit
103434cd
authored
Jan 10, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟进列表
parent
1ace4769
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
3 deletions
+63
-3
Remark.php
application/index/controller/Remark.php
+59
-0
PhoneFollowUpService.php
application/index/service/PhoneFollowUpService.php
+3
-2
route.php
application/route.php
+1
-1
No files found.
application/index/controller/Remark.php
View file @
103434cd
...
@@ -13,6 +13,7 @@ use app\api_broker\service\ClientService;
...
@@ -13,6 +13,7 @@ use app\api_broker\service\ClientService;
use
app\extra\RedisExt
;
use
app\extra\RedisExt
;
use
app\api_broker\service\VerifyRepetitionService
;
use
app\api_broker\service\VerifyRepetitionService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\index\service\PhoneFollowUpService
;
use
app\index\service\UserService
;
use
app\index\service\UserService
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\AAgentsPhone
;
use
app\model\AAgentsPhone
;
...
@@ -166,6 +167,64 @@ class Remark extends Basic
...
@@ -166,6 +167,64 @@ class Remark extends Basic
return
$this
->
response
(
200
,
'成功'
,
$data
);
return
$this
->
response
(
200
,
'成功'
,
$data
);
}
}
/**
* 跟进列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
followUpListV2
()
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'remark_follow_index'
);
}
$m_user
=
new
Users
();
$m_label
=
new
ULabels
();
$m_agent
=
new
AAgents
();
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$follow_up_service
=
new
PhoneFollowUpService
(
$this
->
siteId
);
$where
=
[];
if
(
!
empty
(
$this
->
params
[
'user_id'
]))
{
$where
[
'user_id'
]
=
$this
->
params
[
'user_id'
];
}
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'agent_id'
]
=
$this
->
params
[
'agent_id'
];
}
$list
=
$follow_up_service
->
getPhoneFollowList
(
$this
->
params
[
'start_date'
],
$this
->
params
[
'end_date'
],
$where
,
$this
->
userId
);
$label_data
=
$m_label
->
getColumn
(
'id,name'
,
[
'type'
=>
1
]);
//获取标签
if
(
$list
[
'code'
]
==
200
)
{
foreach
(
$list
as
$k
=>
$v
)
{
if
(
!
empty
(
$v
[
'user_id'
]))
{
$user_data
=
$m_user
->
getUserById
(
'user_name,user_phone,vip,agent_id,create_time'
,
$v
[
'user_id'
]);
$list
[
$k
][
'user_name'
]
=
$user_data
[
'user_name'
];
$list
[
$k
][
'user_phone'
]
=
$user_data
[
'user_phone'
];
$list
[
$k
][
'u_create_time'
]
=
$user_data
[
'create_time'
];
$list
[
$k
][
'vip'
]
=
$user_data
[
'vip'
];
$list
[
$k
][
'agent_id'
]
=
$user_data
[
'agent_id'
];
//客户客方
}
$list
[
$k
][
'user_phone'
]
=
substr_replace
(
$list
[
$k
][
'user_phone'
],
'****'
,
3
,
4
);
$list
[
$k
][
'admin'
]
=
$m_agent
->
getAgentsById
(
$v
[
'agent_id'
],
'name'
);
$data
[
$k
][
'label_name'
]
=
array_key_exists
(
$v
[
'labels_id'
],
$label_data
)
?
$label_data
[
$v
[
'labels_id'
]]
:
''
;
}
$code
=
200
;
$msg
=
''
;
}
else
{
$msg
=
$list
[
'msg'
];
$code
=
101
;
$list
=
[];
}
$data
[
'data'
][
'list'
]
=
$list
;
$data
[
'data'
][
'total'
]
=
40000
;
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
/**
/**
* @return \think\Response
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
...
...
application/index/service/PhoneFollowUpService.php
View file @
103434cd
...
@@ -30,12 +30,13 @@ class PhoneFollowUpService
...
@@ -30,12 +30,13 @@ class PhoneFollowUpService
* @param string $end_time
* @param string $end_time
* @param array $params
* @param array $params
* @param string $field
* @param string $field
* @return array|bool|false|\PDOStatement|string|\think\Collection
* @param $agent_id
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @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'
,
$agent_id
)
public
function
getPhoneFollowList
(
string
$start_time
,
string
$end_time
,
array
$params
,
$
agent_id
,
$field
=
'id,user_id,create_time,content,user_status,labels_id,agent_id'
)
{
{
$vrs
=
new
VerifyRepetitionService
();
$vrs
=
new
VerifyRepetitionService
();
...
...
application/route.php
View file @
103434cd
...
@@ -199,7 +199,7 @@ Route::group('index', [
...
@@ -199,7 +199,7 @@ Route::group('index', [
'lable'
=>
[
'index/label/index'
,
[
'method'
=>
'get'
]],
//标签列表
'lable'
=>
[
'index/label/index'
,
[
'method'
=>
'get'
]],
//标签列表
'getDistrict'
=>
[
'index/District/getList'
,
[
'method'
=>
'get'
]],
//获取部门列表
'getDistrict'
=>
[
'index/District/getList'
,
[
'method'
=>
'get'
]],
//获取部门列表
//数据统计
//数据统计
'RemarkFollowList'
=>
[
'index/remark/followUpList'
,
[
'method'
=>
'get'
]],
//跟进列表
'RemarkFollowList'
=>
[
'index/remark/followUpList
V2
'
,
[
'method'
=>
'get'
]],
//跟进列表
'phone_list'
=>
[
'index/Phone/index'
,
[
'method'
=>
'get'
]],
//隐私号码列表
'phone_list'
=>
[
'index/Phone/index'
,
[
'method'
=>
'get'
]],
//隐私号码列表
'bindPhoneList'
=>
[
'index/Phone/bindPhoneList'
,
[
'method'
=>
'get'
]],
//绑定的隐私号码列表
'bindPhoneList'
=>
[
'index/Phone/bindPhoneList'
,
[
'method'
=>
'get'
]],
//绑定的隐私号码列表
'edit_aliYunPhone'
=>
[
'index/Phone/edit_aliYunPhone'
,
[
'method'
=>
'get|post'
]],
//新增或编辑中间号
'edit_aliYunPhone'
=>
[
'index/Phone/edit_aliYunPhone'
,
[
'method'
=>
'get|post'
]],
//新增或编辑中间号
...
...
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