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
54d998b7
Commit
54d998b7
authored
Jan 09, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户绑定
parent
72d39b27
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
7 deletions
+21
-7
User.php
application/api_broker/controller/User.php
+3
-0
Member.php
application/index/controller/Member.php
+5
-2
UserService.php
application/index/service/UserService.php
+13
-4
Users.php
application/model/Users.php
+0
-1
No files found.
application/api_broker/controller/User.php
View file @
54d998b7
...
...
@@ -882,6 +882,9 @@ class User extends Basic
case
5
:
return
$this
->
response
(
"300"
,
"绑定失败"
);
break
;
case
6
:
return
$this
->
response
(
"300"
,
"不得绑定自己"
);
break
;
case
0
:
return
$this
->
response
(
"200"
,
"绑定成功"
);
break
;
...
...
application/index/controller/Member.php
View file @
54d998b7
...
...
@@ -159,7 +159,7 @@ class Member extends Basic{
//面积需求2
if
(
$params
[
'area_start'
]
>=
0
&&
$params
[
'area_end'
]
>=
0
)
{
//面积
if
(
((
!
empty
(
$params
[
'area_start'
]))
&&
(
$params
[
'area_start'
]
>=
0
))
&&
((
!
empty
(
$params
[
'area_end'
]))
&&
(
$params
[
'area_end'
]
>=
0
))
)
{
//面积
$where
[
'a.area_demand'
]
=
array
(
'between'
,
array
(
$params
[
'area_start'
],
$params
[
'area_end'
]
)
);
}
else
{
//面积需求1
...
...
@@ -180,7 +180,7 @@ class Member extends Basic{
//价格需求2
if
(
$params
[
'price_start'
]
>=
0
&&
$params
[
'price_end'
]
>=
0
)
{
//金额
if
(
((
!
empty
(
$params
[
'price_start'
]))
&&
(
$params
[
'price_start'
]
>=
0
))
&&
((
!
empty
(
$params
[
'price_end'
]))
&&
(
$params
[
'price_end'
]
>=
0
)))
{
//金额
$where
[
'a.price_demand'
]
=
array
(
'between'
,
array
(
$params
[
'price_start'
],
$params
[
'price_end'
]
)
);
}
else
{
//价格需求1
...
...
@@ -575,6 +575,9 @@ class Member extends Basic{
case
5
:
return
$this
->
response
(
"300"
,
"绑定失败"
);
break
;
case
6
:
return
$this
->
response
(
"300"
,
"不得绑定自己"
);
break
;
case
0
:
return
$this
->
response
(
"200"
,
"绑定成功"
);
break
;
...
...
application/index/service/UserService.php
View file @
54d998b7
...
...
@@ -519,9 +519,16 @@ class UserService
* @return int
*/
public
function
addUserBind
(
$user_id
,
$bind_id
){
// big_log($user_id);
// big_log($bind_id);
if
(
!
$user_id
or
!
$bind_id
){
return
1
;
}
if
(
$user_id
==
$bind_id
){
return
6
;
}
// 先查当前用户bind_id是否等于0
$user_info
=
$this
->
user
->
getUserById
(
$field
=
'bind_id'
,
$user_id
);
if
(
$user_info
[
'bind_id'
]
!=
0
){
...
...
@@ -530,10 +537,12 @@ class UserService
// 不等于0 查bind_id=当前bind_id 同时查id=bind_id
$user_bind
=
$this
->
userBindInfo
(
$user_id
);
if
(
count
(
$user_bind
)
>
0
){
return
3
;
return
3
;
//防止是主账号
}
$b_user_bind
=
$this
->
userBindInfo
(
$bind_id
);
if
(
count
(
$b_user_bind
)
>
5
){
// big_log(count($b_user_bind));
// big_log('=======================');
if
(
count
(
$b_user_bind
)
>
3
){
return
4
;
}
//
...
...
@@ -562,13 +571,13 @@ class UserService
// 检查权限 客方自己 有权限的人
$user_agent_id
=
$this
->
user
->
getUserByWhereValue
(
'agent_id'
,
[
'id'
=>
$user_id
]);
if
(
$user_agent_id
[
'agent_id'
!=
$agent_id
]){
return
1
;
//操作人不是客方
//
return 1;//操作人不是客方
}
$s_vip
=
new
VipService
();
//0:有权限 1:无权限
$is_can_edit
=
$s_vip
->
vip
(
$agent_id
,
'addAgentsBlackList'
);
if
(
$is_can_edit
==
1
)
{
return
2
;
//无解除关联权限权限
//
return 2;//无解除关联权限权限
}
// 客户bind_id不等于0才能解绑并记录日志
$user_info
=
$this
->
user
->
getUserById
(
$field
=
'bind_id'
,
$user_id
);
...
...
application/model/Users.php
View file @
54d998b7
...
...
@@ -162,7 +162,6 @@ class Users extends Model
->
page
(
$pageNo
)
->
select
();
}
return
$result
;
}
...
...
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