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
fc6f7706
Commit
fc6f7706
authored
Mar 05, 2018
by
zfc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
b端经纪人我的客户列表不显示公共客户
parent
0f526851
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
28 deletions
+1
-28
Client.php
application/api_broker/controller/Client.php
+1
-28
No files found.
application/api_broker/controller/Client.php
View file @
fc6f7706
...
@@ -78,34 +78,7 @@ class Client extends Basic
...
@@ -78,34 +78,7 @@ class Client extends Basic
}
}
/**经纪人搜索
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
agentSearch
(){
header
(
'Access-Control-Allow-Origin:*'
);
$table
=
new
Agents
;
$data
[
'msg'
]
=
''
;
$params
=
$this
->
request
->
param
();
$search
=
$params
[
'search'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$field
=
[
'id'
,
'realname'
,
'phone'
];
$where
=
'level in(2,5) '
;
if
(
!
empty
(
$search
)){
$where
.=
" and realname like '%
$search
%' or phone like '%
$search
%' "
;
$data
[
'search'
]
=
$search
;
}
$order
=
"id desc"
;
$data
[
'list'
]
=
$table
->
searchList
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$where
);
$total
=
$table
->
searchTotal
(
$where
);
$data
[
'total'
]
=
ceil
(
$total
/
$pageSize
);
$data
[
'page'
]
=
$pageNo
;
return
$this
->
response
(
200
,
'成功'
,
$data
);
}
/**经纪人搜索
/**经纪人搜索
* @return \think\Response
* @return \think\Response
...
@@ -165,7 +138,7 @@ class Client extends Basic
...
@@ -165,7 +138,7 @@ class Client extends Basic
'create_time'
,
'create_time'
,
"TIMESTAMPDIFF(MINUTE,create_time,'
{
$time
}
')as time_minute_diff"
];
"TIMESTAMPDIFF(MINUTE,create_time,'
{
$time
}
')as time_minute_diff"
];
$where
=
" ( agent_id in(
0,
{
$params
[
'agent_id'
]
}
)
$where
=
" ( agent_id in(
{
$params
[
'agent_id'
]
}
)
or TIMESTAMPDIFF(MINUTE,create_time,'
{
$time
}
') > 2880 )"
;
or TIMESTAMPDIFF(MINUTE,create_time,'
{
$time
}
') > 2880 )"
;
if
(
!
empty
(
$search
)){
if
(
!
empty
(
$search
)){
$where
.=
" and user_nick like '%
$search
%' or user_phone like '%
$search
%' "
;
$where
.=
" and user_nick like '%
$search
%' or user_phone like '%
$search
%' "
;
...
...
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