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
6c773e6a
Commit
6c773e6a
authored
Apr 09, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改客户详情
parent
17986704
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
32 deletions
+20
-32
Broker.php
application/api_broker/controller/Broker.php
+20
-32
No files found.
application/api_broker/controller/Broker.php
View file @
6c773e6a
...
@@ -232,9 +232,7 @@ class Broker extends Basic
...
@@ -232,9 +232,7 @@ class Broker extends Basic
public
function
useraction_search
()
public
function
useraction_search
()
{
{
header
(
'Access-Control-Allow-Origin:*'
);
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*$params['user_id'] ='1';
$params['searchdate'] ='跟进内容';*/
if
(
!
isset
(
$params
[
'user_id'
]))
{
if
(
!
isset
(
$params
[
'user_id'
]))
{
return
$this
->
response
(
"300"
,
"参数不全"
,
[
'remote_groupid'
=>
''
]);
return
$this
->
response
(
"300"
,
"参数不全"
,
[
'remote_groupid'
=>
''
]);
...
@@ -247,48 +245,38 @@ class Broker extends Basic
...
@@ -247,48 +245,38 @@ class Broker extends Basic
$UPhoneFollowPp
=
new
UPhoneFollowPp
();
$UPhoneFollowPp
=
new
UPhoneFollowPp
();
// 查询电话跟进数据
// 查询电话跟进数据
$UPhoneFollowPp_res
=
$UPhoneFollowPp
->
select_useraction_search
(
$user_id
,
$searchdate
);
$UPhoneFollowPp_res
=
$UPhoneFollowPp
->
select_useraction_search
(
$user_id
,
$searchdate
);
//var_dump($UPhoneFollowPp_res);
/*dump($total);
$table
=
new
AAgents
();
var_dump($user_res);
exit;*/
//dump($UPhoneFollowPp_res);
foreach
(
$UPhoneFollowPp_res
as
$k
=>
$v
){
foreach
(
$UPhoneFollowPp_res
as
$k
=>
$v
){
$table
=
new
AAgents
();
$Agents_res
=
$table
->
verifyUser
(
'name,phone'
,
''
,[
'id'
=>
$v
[
'agent_id'
]]);
$Agents_res
=
$table
->
Agents_res
(
$v
[
'agent_id'
]);
$UPhoneFollowPp_res
[
$k
][
'agentinfo'
]
=
$Agents_res
?
$Agents_res
[
'name'
]
.
'-'
.
$Agents_res
[
'phone'
]
:
'未知'
;
//dump($Agents_res);
$UPhoneFollowPp_res
[
$k
][
'user_pic'
]
=
AGENTHEADERIMGURL
.
$Agents_res
[
'img'
];
$UPhoneFollowPp_res
[
$k
][
'agentinfo'
]
=
$Agents_res
?
$Agents_res
[
'store_name'
]
.
'-'
.
$Agents_res
[
'name'
]
:
'未知'
;
$UPhoneFollowPp_res
[
$k
][
'label'
]
=
''
;
$UPhoneFollowPp_res
[
$k
][
'user_pic'
]
=
AGENTHEADERIMGURL
.
$Agents_res
[
'img'
];
$UPhoneFollowPp_res
[
$k
][
'label'
]
=
''
;
//dump($v['labels_id']);
//电话跟进标签
//电话跟进标签
if
(
$v
[
'labels_id'
]){
if
(
$v
[
'labels_id'
]){
$table
=
new
ULabels
();
$table
=
new
ULabels
();
$table_res
=
$table
->
get_labelsname
(
$v
[
'labels_id'
]);
$table_res
=
$table
->
get_labelsname
(
$v
[
'labels_id'
]);
//dump($table_res);
//exit;
$UPhoneFollowPp_res
[
$k
][
'label'
]
=
$table_res
[
0
][
'name'
];
$UPhoneFollowPp_res
[
$k
][
'label'
]
=
$table_res
[
0
][
'name'
];
}
}
}
}
$user
=
new
Users
();
$user
=
new
Users
();
$user_res
=
$user
->
useraction_search_user_res
(
$user_id
);
$user_res
=
$user
->
useraction_search_user_res
(
$user_id
);
//dump($user_res);
$user_res
[
'user_pic'
]
=
HEADERIMGURL
.
$user_res
[
'user_pic'
];
$table
=
new
AAgents
();
$Agents_res
=
$table
->
Agents_res
(
$v
[
'agent_id'
]);
//dump($Agents_res);
$user_res
[
'agentinfo'
]
=
$Agents_res
?
$Agents_res
[
'name'
]
.
'/'
.
$Agents_res
[
'phone'
]
:
'未知'
;
$records
=
new
GOperatingRecords
();
$user_res
[
'user_pic'
]
=
HEADERIMGURL
.
$user_res
[
'user_pic'
];
$records_result
=
$records
->
user_history
(
$user_id
);
$table
=
new
AAgents
();
//dump($records_result);
$Agents_res
=
$table
->
verifyUser
(
'name,phone'
,
''
,
[
'id'
=>
$user_res
[
'agent_id'
]]);
//dump($user_id);
return
$this
->
response
(
"200"
,
"success!"
,
[
'user_info'
=>
$user_res
,
'user_date'
=>
$UPhoneFollowPp_res
,
'user_history'
=>
$records_result
])
;
$user_res
[
'agentinfo'
]
=
$Agents_res
?
$Agents_res
[
'name'
]
.
'-'
.
$Agents_res
[
'phone'
]
:
'未知'
;
$records
=
new
GOperatingRecords
();
$records_result
=
$records
->
user_history
(
$user_id
);
$data
[
'user_info'
]
=
$user_res
;
$data
[
'user_date'
]
=
$UPhoneFollowPp_res
;
$data
[
'user_history'
]
=
$records_result
;
return
$this
->
response
(
"200"
,
"success!"
,
$data
);
}
}
/**
/**
...
...
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