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
648724d6
Commit
648724d6
authored
Apr 17, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改客方跟进
parent
4bc5f77d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
Client.php
application/api_broker/controller/Client.php
+17
-19
Member.php
application/index/controller/Member.php
+2
-0
No files found.
application/api_broker/controller/Client.php
View file @
648724d6
...
...
@@ -245,13 +245,12 @@ class Client extends Basic
public
function
all_user
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$Two_days_ago
=
date
(
"Y-m-d h:i:s"
,
strtotime
(
"-2 day"
));
//dump($Two_days_ago);
$params
=
$this
->
params
;
#测试数据
// $params['phone_or_name'] = '666' ;
// $params['pagenum'] = '1' ;
// $params['user_id'] = '
10
' ;
// $params['user_id'] = '
user_id
' ;
// $params['type'] = 0 ;
// $params['search_type'] = '2' ;
#测试数据 end
...
...
@@ -260,7 +259,6 @@ class Client extends Basic
return
$this
->
response
(
"300"
,
"参数不全"
,
[
'remote_groupid'
=>
''
]);
}
$phone_or_name
=
trim
(
$params
[
'phone_or_name'
]);
$pagenum
=
isset
(
$params
[
'pagenum'
])
?
$params
[
'pagenum'
]
:
1
;
$pagesize
=
15
;
...
...
@@ -269,41 +267,40 @@ class Client extends Basic
$search_type
=
$params
[
'search_type'
];
#无:'';客户电话:0;客户姓名:1;跟进:2;
if
(
$search_type
==
'0'
)
{
//客户电话
{
//客户电话
$conditions
[
'user_phone'
]
=
[
'LIKE'
,
$phone_or_name
.
'%'
];
}
elseif
(
$search_type
==
'1'
){
//客户
$conditions
[
'user_nick'
]
=
[
'LIKE'
,
$phone_or_name
.
'%'
];
}
if
(
$search_type
!=
'2'
)
{
//全部客户
{
//全部客户
if
(
$search_type
==
''
){
if
(
$type
==
'0'
)
{
//求租:0 ;已租:1 数据库0:求租;1:已租;-1:无效
$conditions
[
'user_status'
]
=
0
;
}
else
{
//
}
else
{
$conditions
[
'user_status'
]
=
1
;
}
}
$user
=
new
Users
();
$user_res
=
$user
->
all_user
(
$conditions
,
$pagesize
,
$pagenum
);
$total
=
$user
->
all_user_count
(
$conditions
);
//dump($conditions);//exit;
}
else
{
//跟进
}
else
{
//跟进
$UPhoneFollowPp
=
new
UPhoneFollowPp
();
$user_res
=
$UPhoneFollowPp
->
all_user_search
(
$phone_or_name
,
$pagesize
,
$pagenum
);
$total
=
$UPhoneFollowPp
->
all_user_search_count
(
$phone_or_name
);
//dump($total);exit;
}
if
(
$search_type
!=
'2'
)
{
//全部客户数据处理
{
//全部客户数据处理
foreach
(
$user_res
as
$k
=>
$v
)
{
$label
=
array
();
//dump($v);exit;
$label
=
[];
$user_res
[
$k
][
'user_nick'
]
=
$v
[
'user_nick'
]
?
$v
[
'user_nick'
]
:
'未知'
;
if
(
$user_id
==
$v
[
'agent_id'
])
{
...
...
@@ -314,6 +311,7 @@ class Client extends Basic
{
$label[] = '保护期内';
}*/
//无效客户不显示标签
if
(
$v
[
'user_status'
]
!=
-
1
){
$user_res
[
$k
][
'label'
]
=
implode
(
','
,
$label
);
...
...
@@ -334,13 +332,13 @@ class Client extends Basic
}
}
/*dump($total);
var_dump($user_res);
exit;*/
$total
=
intval
(
$total
/
$pagesize
)
+
((
$total
%
$pagesize
==
0
)
?
0
:
1
);
return
$this
->
response
(
"200"
,
"success!"
,
[
'user_date'
=>
$user_res
,
'pagenum'
=>
$pagenum
,
'total'
=>
$total
,
'search_type'
=>
$search_type
]);
$data
[
'user_date'
]
=
$user_res
;
$data
[
'pagenum'
]
=
$pagenum
;
$data
[
'total'
]
=
$total
;
$data
[
'search_type'
]
=
$search_type
;
return
$this
->
response
(
"200"
,
"success!"
,
$data
);
}
/**
...
...
application/index/controller/Member.php
View file @
648724d6
...
...
@@ -198,6 +198,8 @@ class Member extends Basic{
$params
[
'type'
]
=
1
;
$params
[
'user_status'
]
=
$params
[
'user_status'
];
$table
->
allowField
(
true
)
->
save
(
$params
);
$user
=
new
Users
();
$user
->
update_user_status
([
'id'
=>
$params
[
'user_id'
],
'user_status'
=>
$params
[
'user_status'
]]);
return
$this
->
response
(
$status
,
$msg
,
$params
);
}
...
...
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