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
7d6299f7
Commit
7d6299f7
authored
Jul 16, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户id搜索
parent
f824927c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
User.php
application/api_broker/controller/User.php
+35
-2
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/User.php
View file @
7d6299f7
...
...
@@ -260,8 +260,6 @@ class User extends Basic
}
// big_log($conditions);
$field
=
"id as user_id,sex,user_name,city,user_phone,user_status,agent_id,create_time,industry_type,
price_demand,area_demand,vip,user_label,source_intro,site_ids,entrust_type,concrete_industry"
;
$return_user_list
=
$this
->
userModel
->
selectUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
,
"id desc"
);
...
...
@@ -315,6 +313,7 @@ class User extends Basic
/**
* 将经纪人所在城市的客户拍前面
* @param $user_list
...
...
@@ -976,4 +975,37 @@ class User extends Basic
return
$this
->
response
(
"200"
,
"成功"
);
}
/**
* 关联客户-根据id搜索客户
* @return \think\Response
*/
public
function
bindUserList
()
{
$params
=
$this
->
params
;
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$conditions
[
'id'
]
=
0
;
if
(
isset
(
$params
[
'id'
]))
{
$conditions
[
'id'
]
=
$params
[
'id'
];
}
$field
=
"id as user_id,sex,user_name,city,user_phone"
;
$return_user_list
=
$this
->
userModel
->
selectUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
,
"id desc"
);
if
(
empty
(
$return_user_list
))
{
return
$this
->
response
(
"200"
,
"此条件没有找到数据"
);
}
foreach
(
$return_user_list
as
$k
=>
$v
)
{
$return_user_list
[
$k
][
'user_phone'
]
=
substr_replace
(
$return_user_list
[
$k
][
'user_phone'
],
'****'
,
3
,
4
);
$return_user_list
[
$k
][
'user_name'
]
=
$v
[
'user_name'
]
&&
$v
[
'entrust_type'
]
==
0
?
"
{
$v
[
'concrete_industry'
]
}
,
{
$v
[
'user_name'
]
}
"
:
$v
[
'user_name'
];
}
$data
[
'total_page'
]
=
count
(
$return_user_list
);
$data
[
'user_date'
]
=
$return_user_list
;
return
$this
->
response
(
"200"
,
'request success'
,
$data
);
}
}
\ No newline at end of file
application/route.php
View file @
7d6299f7
...
...
@@ -867,6 +867,7 @@ Route::group('broker', [
//user
'returnSearchCondition'
=>
[
'api_broker/User/returnSearchCondition'
,
[
'method'
=>
'get'
]],
//客户搜索条件
'searchUser'
=>
[
'api_broker/User/searchUser'
,
[
'method'
=>
'get|post'
]],
//客户搜索
'bindUserList'
=>
[
'api_broker/User/bindUserList'
,
[
'method'
=>
'get|post'
]],
//关联客户-根据id搜索客户
'getLastOrNextUserID'
=>
[
'api_broker/User/getLastOrNextUserID'
,
[
'method'
=>
'get|post'
]],
//
'superviseListNew'
=>
[
'api_broker/Supervise/superviseList'
,
[
'method'
=>
'POST|GET'
]],
//监督执行列表
...
...
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