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
229b2238
Commit
229b2238
authored
Feb 11, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户搜索
parent
115f0666
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
Broker.php
application/api_broker/controller/Broker.php
+38
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Broker.php
View file @
229b2238
...
@@ -13,6 +13,7 @@ use app\api\untils\JwtUntils;
...
@@ -13,6 +13,7 @@ use app\api\untils\JwtUntils;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\UPhoneFollowPp
;
use
app\model\UPhoneFollowPp
;
use
app\model\Users
;
use
think\Request
;
use
think\Request
;
class
Broker
extends
Basic
class
Broker
extends
Basic
...
@@ -137,4 +138,40 @@ class Broker extends Basic
...
@@ -137,4 +138,40 @@ class Broker extends Basic
return
$this
->
response
(
"101"
,
"失败!"
);
return
$this
->
response
(
"101"
,
"失败!"
);
}
}
}
}
/**
* 客户搜索
* @return \think\Response
*/
public
function
user_search
()
{
$params
=
$this
->
params
;
$params
[
'phone_or_name'
]
=
'22'
;
if
(
!
isset
(
$params
[
'phone_or_name'
]))
{
return
$this
->
response
(
"300"
,
"参数不全"
,
[
'remote_groupid'
=>
''
]);
}
$phone_or_name
=
trim
(
$params
[
'phone_or_name'
]);
$pageSize
=
15
;
$pageNo
=
1
;
//主表查询商铺详细信息
$user
=
new
Users
();
// 查询数据集
$user_res
=
$user
->
where
(
'user_nick|user_phone'
,
'like'
,
"%
$phone_or_name
%"
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
$user_rescount
=
$user
->
where
(
'user_nick|user_phone'
,
'like'
,
"%
$phone_or_name
%"
)
->
count
();
dump
(
$user_rescount
);
// var_dump($user_res);
// exit;
if
(
$user_res
)
{
return
$this
->
response
(
"200"
,
"success!"
,
$user_res
);
}
else
{
return
$this
->
response
(
"101"
,
"失败!"
);
}
}
}
}
\ No newline at end of file
application/route.php
View file @
229b2238
...
@@ -225,6 +225,7 @@ Route::group('broker', [
...
@@ -225,6 +225,7 @@ Route::group('broker', [
'labelEdit'
=>
[
'api_broker/label/index'
,[
'method'
=>
'get|post'
]],
//编辑标签
'labelEdit'
=>
[
'api_broker/label/index'
,[
'method'
=>
'get|post'
]],
//编辑标签
'getLabelsList'
=>
[
'api_broker/label/getLabelsList'
,[
'method'
=>
'get'
]],
//标签列表
'getLabelsList'
=>
[
'api_broker/label/getLabelsList'
,[
'method'
=>
'get'
]],
//标签列表
'add_phone_follow_up'
=>
[
'api_broker/broker/add_phone_follow_up'
,[
'method'
=>
'get|post'
]],
//新增-客户电话跟进
'add_phone_follow_up'
=>
[
'api_broker/broker/add_phone_follow_up'
,[
'method'
=>
'get|post'
]],
//新增-客户电话跟进
'user_search'
=>
[
'api_broker/broker/user_search'
,[
'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