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
2d63fa5b
Commit
2d63fa5b
authored
Apr 11, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复
parent
94c951a8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
208 additions
and
59 deletions
+208
-59
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+10
-23
Remark.php
application/index/controller/Remark.php
+176
-5
PhoneFollowUpService.php
application/index/service/PhoneFollowUpService.php
+21
-30
route.php
application/route.php
+1
-1
No files found.
application/api_broker/controller/HomePageLog.php
View file @
2d63fa5b
...
@@ -126,30 +126,17 @@ class HomePageLog extends Basic
...
@@ -126,30 +126,17 @@ class HomePageLog extends Basic
$result
=
$this
->
uPhoneFollowUpModel
->
getFollowList
(
$pageNo
,
$pageSize
,
''
,
$field
,
$where
);
$result
=
$this
->
uPhoneFollowUpModel
->
getFollowList
(
$pageNo
,
$pageSize
,
''
,
$field
,
$where
);
}
}
$clientService
=
new
ClientService
();
$clientService
=
new
ClientService
();
// $m_label = new ULabels();
$m_label
=
new
ULabels
();
$redis_service
=
new
RedisCacheService
();
$label_data
=
$m_label
->
getColumn
(
'id,name'
,
[
'type'
=>
1
]);
//获取标签
// $label_data = $m_label->getColumn('id,name', ['type'=>1]); //获取标签
$label_data
=
$redis_service
->
userCallLabelCache
();
foreach
(
$result
as
$key
=>
$value
)
{
foreach
(
$result
as
$key
=>
$value
)
{
// $agent_params = [];
$agent_params
=
[];
// $agent_params["a.id"] = $value['agent_id'];
$agent_params
[
"a.id"
]
=
$value
[
'agent_id'
];
// $agent_field = "a.name,a.img,b.store_name";
$agent_field
=
"a.name,a.img,b.store_name"
;
// $model = new AAgents();
$model
=
new
AAgents
();
// $res_a = $model->getAgentsInfo($agent_field, $agent_params);
$res_a
=
$model
->
getAgentsInfo
(
$agent_field
,
$agent_params
);
// $result[$key]['name'] = $res_a[0]['name'];
$result
[
$key
][
'name'
]
=
$res_a
[
0
][
'name'
];
// $result[$key]['img'] = $res_a[0]['img'];
$result
[
$key
][
'img'
]
=
$res_a
[
0
][
'img'
];
// $result[$key]['store_name'] = $res_a[0]['store_name'];
$result
[
$key
][
'store_name'
]
=
$res_a
[
0
][
'store_name'
];
if
(
$value
[
'agent_id'
])
{
$agent_data
=
$redis_service
->
getRedisCache
(
2
,
$value
[
'agent_id'
]);
$result
[
$key
][
'name'
]
=
$agent_data
[
'name'
];
$result
[
$key
][
'img'
]
=
$agent_data
[
'img'
];
$result
[
$key
][
'store_name'
]
=
$agent_data
[
'store_name'
];
}
else
{
$result
[
$key
][
'name'
]
=
[];
$result
[
$key
][
'img'
]
=
[];
$result
[
$key
][
'store_name'
]
=
[];
}
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$ser
=
new
UserExpiredTimeService
();
$ser
=
new
UserExpiredTimeService
();
...
...
application/index/controller/Remark.php
View file @
2d63fa5b
...
@@ -10,7 +10,6 @@ namespace app\index\controller;
...
@@ -10,7 +10,6 @@ namespace app\index\controller;
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\RedisCacheService
;
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
;
...
@@ -31,8 +30,153 @@ class Remark extends Basic
...
@@ -31,8 +30,153 @@ class Remark extends Basic
* 跟进列表
* 跟进列表
*
*
* @return \think\Response
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
followUpList
()
public
function
followUpList
()
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'remark_follow_index'
);
}
$vrs
=
new
VerifyRepetitionService
();
$is_check
=
$vrs
->
followUpClick
(
$this
->
userId
);
if
(
$this
->
params
[
'pageNo'
]
==
1
&&
!
$is_check
){
$is_bool
=
$vrs
->
getCurrTimeSection
();
$msg
=
"请勿频繁请求"
;
if
(
$is_bool
)
{
$msg
=
"高峰期间每10秒钟只能搜索一次(6.30-8.30)"
;
}
return
$this
->
response
(
"101"
,
$msg
);
}
$u_phone_follow
=
new
UPhoneFollowUp
(
$this
->
siteId
);
$user_service
=
new
UserService
();
$clientService
=
new
ClientService
();
$m_agent_phone
=
new
AAgentsPhone
();
$m_user
=
new
Users
();
$m_label
=
new
ULabels
();
$m_agent
=
new
AAgents
();
$redis
=
RedisExt
::
getRedis
();
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$agent_where
=
$where
=
[];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
if
(
!
empty
(
$this
->
params
[
'start_date'
])
&&
empty
(
$this
->
params
[
'end_date'
]))
{
$where
[
'create_time'
]
=
[
'> time'
,
$this
->
params
[
'start_date'
]
.
' 00:00:00'
];
}
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
empty
(
$this
->
params
[
'start_date'
]))
{
$where
[
'create_time'
]
=
[
'< time'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
];;
}
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
!
empty
(
$this
->
params
[
'start_date'
]))
{
$where
[
'create_time'
]
=
[
'between'
,
[
$this
->
params
[
'start_date'
]
.
' 00:00:00'
,
$this
->
params
[
'end_date'
]
.
' 23:59:59'
]];
}
if
(
!
empty
(
$this
->
params
[
'content'
]))
{
$content
=
trim
(
$this
->
params
[
'content'
]);
$where
[
'content'
]
=
[
'LIKE'
,
"%
{
$content
}
%"
];
}
//跟进人id
if
(
!
empty
(
$this
->
params
[
'agent_id'
]))
{
$agent_where
[
'id'
]
=
$this
->
params
[
'agent_id'
];
}
//跟进人门店
if
(
!
empty
(
$this
->
params
[
'remark_store_id'
]))
{
$agent_where
[
'store_id'
]
=
$this
->
params
[
'remark_store_id'
];
}
//跟进人部门
if
(
!
empty
(
$this
->
params
[
'remark_district_id'
]))
{
$agent_where
[
'district_id'
]
=
$this
->
params
[
'remark_district_id'
];
}
if
(
!
empty
(
$this
->
params
[
'disc'
]))
{
$where
[
'disc'
]
=
$this
->
params
[
'disc'
];
}
if
(
!
empty
(
$this
->
params
[
'user_id'
]))
{
$where
[
'user_id'
]
=
$this
->
params
[
'user_id'
];
}
if
(
!
empty
(
$agent_where
))
{
$agent_id
=
$m_agent
->
getAgentsByWhereColumn
(
$agent_where
,
'id'
);
if
(
empty
(
$agent_id
))
{
$data
[
'data'
][
'list'
]
=
[];
return
$this
->
response
(
200
,
''
,
$data
);
//处理经纪人空数据
}
else
{
$where
[
'agent_id'
]
=
[
'in'
,
$agent_id
];
}
}
$field
=
'id,user_id,create_time,content,user_status,labels_id,agent_id'
;
$list
=
$u_phone_follow
->
getFollowList
(
$pageNo
,
$pageSize
,
$order_
=
'id desc'
,
$field
,
$where
);
$label_data
=
$m_label
->
getColumn
(
'id,name'
,
[
'type'
=>
1
]);
//获取标签
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'
];
//客户客方
}
//查询客户是否在保护期内
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$is_outstrip_twenty_four_hours
=
$user_service
->
isUserProtect
(
$v
[
"user_id"
]);
$list
[
$k
][
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
/* 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定 start*/
//0允许拨打 1不允许拨打
$is_outpace_call_num
=
0
;
if
(
!
$clientService
->
dialTotal
(
$v
[
"user_id"
]))
{
$is_outpace_call_num
=
1
;
}
$phone
=
$m_agent
->
getAgentsById
(
$this
->
userId
,
'phone'
);
if
(
$is_outpace_call_num
==
1
)
{
$is_privacy
=
$redis
->
get
(
's_is_privacy'
);
//判断是否当前经纪人跟当前客户是否有电话绑定 从redis查询
if
(
empty
(
$phone
))
{
$phone
=
$m_agent_phone
->
getAgentsByWhere
([
'agent_id'
=>
$this
->
userId
],
'phone'
);
}
$call_key
=
'call_'
.
$this
->
userId
.
'_'
.
$phone
.
'_'
.
$v
[
'user_phone'
]
.
'_'
.
$is_privacy
;
$redis_res
=
$redis
->
get
(
$call_key
);
if
(
empty
(
$redis_res
)){
$is_outpace_call_num
=
1
;
}
}
$list
[
$k
][
'is_outpace_call_num'
]
=
$is_outpace_call_num
;
/* 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定 end*/
$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'
]]
:
''
;
}
$data
[
'data'
][
'list'
]
=
$list
;
$data
[
'data'
][
'total'
]
=
40000
;
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
())
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'remark_follow_index'
);
return
view
(
'remark_follow_index'
);
...
@@ -49,6 +193,9 @@ class Remark extends Basic
...
@@ -49,6 +193,9 @@ class Remark extends Basic
}
}
}
}
$m_user
=
new
Users
();
$m_agent
=
new
AAgents
();
$code
=
200
;
$code
=
200
;
$msg
=
''
;
$msg
=
''
;
...
@@ -82,13 +229,37 @@ class Remark extends Basic
...
@@ -82,13 +229,37 @@ class Remark extends Basic
$follow_up_service
=
new
PhoneFollowUpService
(
$site_id
);
$follow_up_service
=
new
PhoneFollowUpService
(
$site_id
);
$result_data
=
$follow_up_service
->
getPhoneFollowList
(
$this
->
params
[
'start_date'
],
$this
->
params
[
'end_date'
],
$where
,
$this
->
userId
);
$result_data
=
$follow_up_service
->
getPhoneFollowList
(
$this
->
params
[
'start_date'
],
$this
->
params
[
'end_date'
],
$where
,
$this
->
userId
);
if
(
$result_data
[
'status'
]
!=
'fail'
)
{
if
(
$result_data
[
'code'
]
==
200
)
{
$data
[
'data'
][
'list'
]
=
$result_data
[
'data'
];
if
(
!
empty
(
$result_data
[
'data'
]))
{
foreach
(
$result_data
[
'data'
]
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'
);
$list
[
$k
][
'label_name'
]
=
$v
[
'label_name'
];
$list
[
$k
][
'is_outstrip_twenty_four_hours'
]
=
$v
[
'is_outstrip_twenty_four_hours'
];
$list
[
$k
][
'is_outpace_call_num'
]
=
$v
[
'is_outpace_call_num'
];
$list
[
$k
][
'create_time'
]
=
$v
[
'create_time'
];
$list
[
$k
][
'user_id'
]
=
$v
[
'user_id'
];
$list
[
$k
][
'content'
]
=
$v
[
'content'
];
$list
[
$k
][
'user_status'
]
=
$v
[
'user_status'
];
$list
[
$k
][
'id'
]
=
$v
[
'id'
];
}
}
}
else
{
}
else
{
$msg
=
$result_data
[
'data'
];
$code
=
101
;
$code
=
101
;
$data
[
'data'
][
'list'
]
=
[];
$list
=
[];
$msg
=
$result_data
[
'msg'
];
}
}
$data
[
'data'
][
'list'
]
=
$list
;
$data
[
'data'
][
'total'
]
=
40000
;
$data
[
'data'
][
'total'
]
=
40000
;
return
$this
->
response
(
$code
,
$msg
,
$data
);
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
...
...
application/index/service/PhoneFollowUpService.php
View file @
2d63fa5b
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
namespace
app\index\service
;
namespace
app\index\service
;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\VerifyRepetitionService
;
use
app\api_broker\service\VerifyRepetitionService
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\ULabels
;
use
app\model\ULabels
;
...
@@ -37,15 +36,17 @@ class PhoneFollowUpService
...
@@ -37,15 +36,17 @@ class PhoneFollowUpService
* @param string $field
* @param string $field
* @param $agent_id
* @param $agent_id
* @return array
* @return array
* @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
,
$agent_id
,
$field
=
'id,user_id,create_time,content,user_status,labels_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'
)
{
{
$msg
=
''
;
$data
=
[];
$vrs
=
new
VerifyRepetitionService
();
$vrs
=
new
VerifyRepetitionService
();
$page_no
=
isset
(
$params
[
'page_no'
])
?
$params
[
'page_no'
]
:
1
;
$page_no
=
isset
(
$params
[
'page_no'
])
?
$params
[
'page_no'
]
:
1
;
$page_size
=
isset
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
15
;
$page_size
=
isset
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
15
;
$status
=
'fail'
;
$is_check
=
$vrs
->
followUpClick
(
$agent_id
);
$is_check
=
$vrs
->
followUpClick
(
$agent_id
);
if
(
$page_no
==
1
&&
!
$is_check
){
if
(
$page_no
==
1
&&
!
$is_check
){
$is_bool
=
$vrs
->
getCurrTimeSection
();
$is_bool
=
$vrs
->
getCurrTimeSection
();
...
@@ -53,14 +54,15 @@ class PhoneFollowUpService
...
@@ -53,14 +54,15 @@ class PhoneFollowUpService
if
(
$is_bool
)
{
if
(
$is_bool
)
{
$msg
=
"高峰期间每10秒钟只能搜索一次(6.30-8.30)"
;
$msg
=
"高峰期间每10秒钟只能搜索一次(6.30-8.30)"
;
}
}
return
[
'
status'
=>
$status
,
'msg
'
=>
$msg
];
return
[
'
code'
=>
'101'
,
'data
'
=>
$msg
];
}
}
$where
=
' 1=1 '
;
$where
=
' 1=1 '
;
if
(
empty
(
$start_time
)
||
empty
(
$end_time
))
{
if
(
empty
(
$start_time
)
||
empty
(
$end_time
))
{
return
[
'
status'
=>
$status
,
'data'
=>
'时间不能为空'
];
return
[
'
code'
=>
'101'
,
'data'
=>
'时间不能为空'
];
}
else
{
}
else
{
$where
.=
' AND create_time BETWEEN "'
.
$start_time
.
' 00:00:00" AND "'
.
$end_time
.
' 23:59:59"'
;
$where
.=
' AND create_time BETWEEN "'
.
$start_time
.
' 00:00:00" AND "'
.
$end_time
.
' 23:59:59"'
;
}
}
$data
=
[];
if
(
isset
(
$params
[
'user_id'
]))
{
if
(
isset
(
$params
[
'user_id'
]))
{
$where
.=
" AND user_id=
{
$params
[
'user_id'
]
}
"
;
$where
.=
" AND user_id=
{
$params
[
'user_id'
]
}
"
;
...
@@ -83,13 +85,12 @@ class PhoneFollowUpService
...
@@ -83,13 +85,12 @@ class PhoneFollowUpService
$where
.=
" AND content LIKE '%
{
$params
[
'content'
]
}
%'"
;
$where
.=
" AND content LIKE '%
{
$params
[
'content'
]
}
%'"
;
}
}
try
{
if
(
!
empty
(
$agent_where
))
{
if
(
!
empty
(
$agent_where
))
{
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
$agent_id
=
$m_agent
->
getAgentsByWhereColumn
(
$agent_where
,
'id'
);
$agent_id
=
$m_agent
->
getAgentsByWhereColumn
(
$agent_where
,
'id'
);
if
(
empty
(
$agent_id
))
{
if
(
empty
(
$agent_id
))
{
return
[
'status'
=>
$status
,
'msg
'
=>
'暂无数据'
];
return
[
'code'
=>
'101'
,
'data
'
=>
'暂无数据'
];
}
else
{
}
else
{
$agent_id_string
=
implode
(
','
,
$agent_id
);
$agent_id_string
=
implode
(
','
,
$agent_id
);
$where
.=
" AND agent_id in (
{
$agent_id_string
}
)"
;
$where
.=
" AND agent_id in (
{
$agent_id_string
}
)"
;
...
@@ -97,43 +98,32 @@ class PhoneFollowUpService
...
@@ -97,43 +98,32 @@ class PhoneFollowUpService
}
}
$date
=
date
(
"Y-m-d"
,
time
());
$date
=
date
(
"Y-m-d"
,
time
());
// if ($end_time < $date && $end_time < $date . " 23:59:59" ) {
if
(
$end_time
==
$date
&&
$start_time
==
$date
)
{
if
(
$end_time
==
$date
&&
$start_time
==
$date
)
{
$data
=
$this
->
phoneFollowUpTemporary
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
'id desc'
,
$field
,
$where
);
$data
=
$this
->
phoneFollowUpTemporary
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
'id desc'
,
$field
,
$where
);
}
else
{
}
else
{
$data
=
$this
->
phoneFollowUp
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
''
,
$field
,
$where
);
$data
=
$this
->
phoneFollowUp
->
getFollowList
(
$page_no
,
$page_size
,
$order_
=
''
,
$field
,
$where
);
}
}
// else {
// $data = $this->phoneFollowUpTemporary->getFollowListV3($this->siteId,$page_no, $page_size, $where, $field);
// }
$s_user_service
=
new
UserService
();
$s_user_service
=
new
UserService
();
$s_user_Log_service
=
new
UserLogService
();
$s_user_Log_service
=
new
UserLogService
();
$redis_service
=
new
RedisCacheService
();
$m_user
=
new
Users
();
$label_data
=
$redis_service
->
userCallLabelCache
();
//获取标签
$m_label
=
new
ULabels
();
$label_data
=
$m_label
->
getColumn
(
'id,name'
,
[
'type'
=>
1
]);
//获取标签
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
if
(
!
empty
(
$v
[
'user_id'
]))
{
$user_data
=
$redis_service
->
getRedisCache
(
1
,
$v
[
'user_id'
]);
#客户是否在保护期内(0:保护器内 1:超过保护期)
#客户是否在保护期内(0:保护器内 1:超过保护期)
$data
[
$k
][
'is_outstrip_twenty_four_hours'
]
=
$s_user_service
->
isUserProtect
(
$v
[
'user_id'
]);
$data
[
$k
][
'is_outstrip_twenty_four_hours'
]
=
$s_user_service
->
isUserProtect
(
$v
[
'user_id'
]);
#判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定(0允许拨打 1不允许拨打)
#判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定(0允许拨打 1不允许拨打)
//
$user_res = $m_user->getUserDetailStreamline($v['user_id'], 'user_name,user_phone');
$user_res
=
$m_user
->
getUserDetailStreamline
(
$v
[
'user_id'
],
'user_name,user_phone'
);
$data
[
$k
][
'is_outpace_call_num'
]
=
$s_user_Log_service
->
userDetailIsOutpaceCallNum
(
$v
[
'user_id'
],
$user_data
[
'user_phone'
],
$agent_id
);
$data
[
$k
][
'is_outpace_call_num'
]
=
$s_user_Log_service
->
userDetailIsOutpaceCallNum
(
$v
[
'user_id'
],
$user_res
[
'user_phone'
],
$agent_id
);
$data
[
$k
][
'label_name'
]
=
array_key_exists
(
$v
[
'labels_id'
],
$label_data
)
?
$label_data
[
$v
[
'labels_id'
]]
:
''
;
$data
[
$k
][
'label_name'
]
=
array_key_exists
(
$v
[
'labels_id'
],
$label_data
)
?
$label_data
[
$v
[
'labels_id'
]]
:
''
;
$data
[
$k
][
'user_name'
]
=
$user_data
[
'user_name'
];
}
else
{
$data
[
$k
][
'user_name'
]
=
''
;
}
}
if
(
!
empty
(
$v
[
'agent_id'
]))
{
return
[
'code'
=>
'200'
,
'data'
=>
$data
];
$agent_data
=
$redis_service
->
getRedisCache
(
2
,
$v
[
'agent_id'
]);
$data
[
$k
][
'admin'
]
=
$agent_data
[
'name'
];
}
else
{
$data
[
$k
][
'admin'
]
=
''
;
}
}
$status
=
'successful'
;
}
catch
(
\Exception
$e
)
{
$msg
=
'内部错误'
.
$e
->
getMessage
();
}
return
[
'status'
=>
$status
,
'msg'
=>
$msg
,
'data'
=>
$data
];
}
}
}
}
\ No newline at end of file
application/route.php
View file @
2d63fa5b
...
@@ -204,7 +204,7 @@ Route::group('index', [
...
@@ -204,7 +204,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