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
8d622287
Commit
8d622287
authored
Oct 22, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟进区分城市
parent
00288d08
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
68 deletions
+17
-68
Broker.php
application/api_broker/controller/Broker.php
+3
-26
CallPhoneService.php
application/api_broker/service/CallPhoneService.php
+7
-1
OrderLogService.php
application/api_broker/service/OrderLogService.php
+3
-2
Remark.php
application/index/controller/Remark.php
+4
-39
No files found.
application/api_broker/controller/Broker.php
View file @
8d622287
...
...
@@ -319,7 +319,7 @@ class Broker extends Basic
$redis
=
RedisExt
::
getRedis
();
$user_key
=
'call_phone_user_'
.
date
(
'Y-m-d'
);
$hash_key
=
$this
->
agentId
.
'-'
.
$params
[
'user_id'
];
$hash_key
=
$this
->
agentId
.
'-'
.
$params
[
'user_id'
]
.
'-'
.
$this
->
siteId
;
$redis
->
hDel
(
$user_key
,
$hash_key
);
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
...
...
@@ -413,29 +413,6 @@ class Broker extends Basic
$user_id
=
$params
[
'user_id'
];
$agent
=
new
AAgents
();
/* $searchdate = empty($params['searchdate']) ? '':$params['searchdate'];
$pagenum = isset($params['pagenum']) ? $params['pagenum'] : 1;
$pagesize = 15;
$UPhoneFollowPp = new UPhoneFollowPp();
// 查询电话跟进数据
$UPhoneFollowPp_res = $UPhoneFollowPp->select_useraction_search($user_id,$searchdate);
foreach($UPhoneFollowPp_res as $k=>$v){
$agents_res = $agent->verifyUser('name,phone,img','',['id'=>$v['agent_id']]);
$UPhoneFollowPp_res[$k]['agentinfo'] = $agents_res ? $agents_res['name'].'-'.$agents_res['phone']:'未知';
$UPhoneFollowPp_res[$k]['user_pic'] = AGENTHEADERIMGURL.$agents_res['img'];
$UPhoneFollowPp_res[$k]['label'] = '';
//电话跟进标签
if($v['labels_id']){
$labels = new ULabels();
$table_res = $labels->get_labelsname($v['labels_id']);
$UPhoneFollowPp_res[$k]['label'] = $table_res[0]['name'];
}
}*/
$user
=
new
Users
();
$user_res
=
$user
->
useraction_search_user_res
(
$user_id
,
1
);
...
...
@@ -450,7 +427,7 @@ class Broker extends Basic
$orderLog
=
new
OrderLogService
();
$data
[
'user_date'
]
=
$orderLog
->
selectListByUserId
(
$user_id
,
''
);
$data
[
'user_date'
]
=
$orderLog
->
selectListByUserId
(
$user_id
,
''
,
$this
->
siteId
);
/*修改记录部分 start*/
$records
=
new
GOperatingRecords
();
...
...
@@ -546,7 +523,7 @@ class Broker extends Basic
return
$this
->
response
(
"101"
,
"请输入需要检索的关键词"
);
}
$orderLog
=
new
OrderLogService
();
$data
=
$orderLog
->
selectListByUserId
(
$params
[
"user_id"
],
$params
[
"keyword"
]);
$data
=
$orderLog
->
selectListByUserId
(
$params
[
"user_id"
],
$params
[
"keyword"
]
,
$this
->
siteId
);
$data
[
'agent_path'
]
=
AGENTHEADERIMGURL
;
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
...
...
application/api_broker/service/CallPhoneService.php
View file @
8d622287
...
...
@@ -497,7 +497,7 @@ class CallPhoneService
*/
public
function
defaultFollowUp
()
{
$m_follow_up
=
new
UPhoneFollowPp
(
$this
->
siteId
);
$current_time
=
time
();
$time
=
$current_time
-
3600
;
$start_date
=
date
(
'Y-m-d'
,
$time
);
...
...
@@ -517,6 +517,12 @@ class CallPhoneService
$array
=
explode
(
'-'
,
$v
);
$follow_where
[
'agent_id'
]
=
$array
[
0
];
$follow_where
[
'user_id'
]
=
$array
[
1
];
if
(
isset
(
$array
[
2
])){
$follow_where
[
'site_id'
]
=
$array
[
2
];
}
else
{
$follow_where
[
'site_id'
]
=
"10001"
;
}
$m_follow_up
=
new
UPhoneFollowPp
(
$follow_where
[
'site_id'
]);
$num
=
$m_follow_up
->
getFollowTotal
(
$follow_where
);
if
(
empty
(
$num
)
&&
!
empty
(
$array
[
1
]))
{
...
...
application/api_broker/service/OrderLogService.php
View file @
8d622287
...
...
@@ -670,12 +670,13 @@ class OrderLogService
*
* @param $user_id
* @param string $search
* @param string $site_id
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectListByUserId
(
$user_id
,
$search
=
""
)
public
function
selectListByUserId
(
$user_id
,
$search
=
""
,
$site_id
)
{
$result
=
[];
$sort
=
0
;
...
...
@@ -688,7 +689,7 @@ class OrderLogService
$oRefundModel
=
new
ORefundModel
();
$oBargainModel
=
new
OBargainModel
();
$uPhoneFollowModel
=
new
UPhoneFollowPp
(
$
this
->
siteI
d
);
$uPhoneFollowModel
=
new
UPhoneFollowPp
(
$
site_i
d
);
//电话跟进
$userParams
[
"user_id"
]
=
$user_id
;
$userParams
[
"type"
]
=
0
;
//电话跟进
...
...
application/index/controller/Remark.php
View file @
8d622287
...
...
@@ -329,49 +329,14 @@ class Remark extends Basic
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
// if (!isset($params['user_id'])) {
// return $this->response("300", "参数不全", [ 'remote_groupid' => '' ]);
// }
$searchdate
=
$params
[
'searchdate'
];
$pagenum
=
isset
(
$params
[
'pagenum'
])
?
$params
[
'pagenum'
]
:
1
;
$pagesize
=
15
;
$user_id
=
$params
[
'user_id'
];
$page_num
=
isset
(
$params
[
'pagenum'
])
?
$params
[
'pagenum'
]
:
1
;
$page_size
=
15
;
$UPhoneFollowPp
=
new
UPhoneFollowPp
(
$this
->
siteId
);
// 查询电话跟进数据
$UPhoneFollowPp_res
=
$UPhoneFollowPp
->
phone_up_list
(
$pagesize
,
$pagenum
);
//dump($UPhoneFollowPp_res);
/*dump($total);
var_dump($user_res);
exit;*/
//dump($UPhoneFollowPp_res);
/*foreach($UPhoneFollowPp_res as $k=>$v){
$table= new Agents();
$Agents_res =$table->Agents_res($v['agent_id']);
//dump($Agents_res);
$UPhoneFollowPp_res[$k]['agentinfo']=$Agents_res?$Agents_res['agentshopname'].'-'.$Agents_res['realname']:'未知';
$UPhoneFollowPp_res[$k]['user_pic']=ADMIN_URL_TL.'user_header/'.$Agents_res['head_portrait'];
$UPhoneFollowPp_res[$k]['label']='';
//dump($v['labels_id']);
//电话跟进标签
if($v['labels_id']){
$table= new ULabels();
$table_res =$table->get_labelsname($v['labels_id']);
//dump($table_res);
//exit;
$UPhoneFollowPp_res[$k]['label']=$table_res[0]['name'];
}
}*/
$UPhoneFollowPp
=
new
UPhoneFollowPp
(
$this
->
siteId
);
$UPhoneFollowPp_res
=
$UPhoneFollowPp
->
phone_up_list
(
$page_size
,
$page_num
);
$total
=
$UPhoneFollowPp
->
phone_up_list_count
();
//dump($total);
$total
=
intval
(
$total
/
$pagesize
)
+
((
$total
%
$pagesize
==
0
)
?
0
:
1
);
//dump($total);
$total
=
intval
(
$total
/
$page_size
)
+
((
$total
%
$page_size
==
0
)
?
0
:
1
);
return
$this
->
response
(
"200"
,
"success!"
,
[
'user_date'
=>
$UPhoneFollowPp_res
,
'pagenum'
=>
$pagenum
,
'total'
=>
$total
]);
}
...
...
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