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
f14a733a
Commit
f14a733a
authored
Aug 07, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户详情上一页下一页接口修改
parent
32771c62
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
User.php
application/api_broker/controller/User.php
+12
-6
ClientService.php
application/api_broker/service/ClientService.php
+1
-0
No files found.
application/api_broker/controller/User.php
View file @
f14a733a
...
@@ -162,7 +162,7 @@ class User extends Basic
...
@@ -162,7 +162,7 @@ class User extends Basic
}
}
//todo 判断是 杭州还是上海
//todo 判断是 杭州还是上海
$where
[
'city'
]
=
'上海市'
;
$where
[
'city'
]
=
trim
(
$this
->
city
)
;
if
(
$params
[
'type'
]
==
'last'
){
if
(
$params
[
'type'
]
==
'last'
){
$where
[
'id'
]
=
[
'gt'
,
$params
[
'user_id'
]];
$where
[
'id'
]
=
[
'gt'
,
$params
[
'user_id'
]];
}
else
{
}
else
{
...
@@ -172,24 +172,29 @@ class User extends Basic
...
@@ -172,24 +172,29 @@ class User extends Basic
$field
=
'id,user_nick,agent_id,vip'
;
$field
=
'id,user_nick,agent_id,vip'
;
$user
=
new
Users
();
$user
=
new
Users
();
$user_res
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
1
);
$user_res
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
1
);
if
(
!
$user_res
){
return
$this
->
response
(
"200"
,
"不符合条件0"
,
[]);
}
//todo 判断是否vip客户,如果是 只有是当前经纪人自己的客户才能查看
//todo 判断是否vip客户,如果是 只有是当前经纪人自己的客户才能查看
//vip客户 0:否 1:是
//vip客户 0:否 1:是
if
((
$user_res
[
'vip'
]
==
1
)
&&
(
$user_res
[
'agent_id'
]
!=
$params
[
'agent_id'
])){
if
((
$user_res
[
'vip'
]
==
1
)
&&
(
$user_res
[
'agent_id'
]
!=
$params
[
'agent_id'
])){
return
$this
->
response
(
"200"
,
"不符合条件"
,
[]);
return
$this
->
response
(
"200"
,
"不符合条件
1
"
,
[]);
}
}
//todo 判断
//todo 判断
$clientService
=
new
ClientService
();
$clientService
=
new
ClientService
();
if
(
$clientService
->
dialTotal
(
$params
[
'user_id'
])){
if
(
!
$clientService
->
dialTotal
(
$params
[
'user_id'
])){
return
$this
->
response
(
"200"
,
"不符合条件
!
"
,
[]);
return
$this
->
response
(
"200"
,
"不符合条件
2
"
,
[]);
}
}
$where
=
[];
$where
=
[];
$where
[
'city'
]
=
'上海市'
;
$where
[
'city'
]
=
trim
(
$this
->
city
)
;
$field
=
'max(id) as max_id'
;
$field
=
'max(id) as max_id'
;
$max_id
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
''
);
$max_id
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
''
);
return
$this
->
response
(
"200"
,
"success!"
,
[
'user_id'
=>
$user_res
[
0
][
'id'
],
'max_user_id'
=>
$max_id
[
0
][
'max_id'
]]);
$field
=
'MIN(id) as min_id'
;
$min_id
=
$user
->
getLastOrNextUserID
(
$where
,
$field
,
$limit
=
''
);
return
$this
->
response
(
"200"
,
"success!"
,
[
'user_id'
=>
$user_res
[
0
][
'id'
],
'max_user_id'
=>
$min_id
[
0
][
'max_id'
],
'min_user_id'
=>
$max_id
[
0
][
'min_id'
]]);
}
}
}
}
\ No newline at end of file
application/api_broker/service/ClientService.php
View file @
f14a733a
...
@@ -38,6 +38,7 @@ class ClientService
...
@@ -38,6 +38,7 @@ class ClientService
$params
[
"user_id"
]
=
$user_id
;
$params
[
"user_id"
]
=
$user_id
;
$total
=
$this
->
uPhoneFollowUpModel
->
getCount
(
$params
);
$total
=
$this
->
uPhoneFollowUpModel
->
getCount
(
$params
);
if
(
$total
>=
$num
)
{
if
(
$total
>=
$num
)
{
return
false
;
return
false
;
}
else
{
}
else
{
...
...
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