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
5dd08ad7
Commit
5dd08ad7
authored
Nov 22, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
youhua
parent
8396459c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
+26
-15
Member.php
application/index/controller/Member.php
+4
-15
UserService.php
application/index/service/UserService.php
+22
-0
No files found.
application/index/controller/Member.php
View file @
5dd08ad7
...
@@ -54,6 +54,8 @@ class Member extends Basic{
...
@@ -54,6 +54,8 @@ class Member extends Basic{
if
(
true
!==
$checkResult
)
{
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
101
,
$checkResult
);
return
$this
->
response
(
101
,
$checkResult
);
}
}
$user_service
=
new
UserService
();
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
...
@@ -314,23 +316,10 @@ class Member extends Basic{
...
@@ -314,23 +316,10 @@ class Member extends Basic{
$return_user_list
[
$k
][
'user_phone'
]
=
hide_customer_phone
(
$return_user_list
[
$k
][
'user_phone'
]);
$return_user_list
[
$k
][
'user_phone'
]
=
hide_customer_phone
(
$return_user_list
[
$k
][
'user_phone'
]);
$return_user_list
[
$k
][
'current_agent_id'
]
=
$this
->
userId
;
$return_user_list
[
$k
][
'current_agent_id'
]
=
$this
->
userId
;
//是否被收藏
/*查询客户是否被经纪人收藏*/
$return_user_list
[
$k
][
"is_collect"
]
=
2
;
$return_user_list
[
$k
][
"is_collect"
]
=
$user_service
->
isCollect
(
$params
[
"agent_id_for_bind"
],
$v
[
"id"
]);
if
(
$params
[
"agent_id_for_bind"
]
&&
$v
[
"id"
]){
//先判断是否已经存在数据
$field
=
'id,status'
;
$get_params
[
'agents_id'
]
=
$params
[
"agent_id_for_bind"
];
$get_params
[
'user_id'
]
=
$v
[
"id"
];
$collect_house
=
new
ACollectUser
();
$res
=
$collect_house
->
getCollectUser
(
$field
,
$get_params
);
if
(
$res
&&
(
$res
[
0
][
'status'
]
==
1
))
{
//如果存在
$return_user_list
[
$k
][
"is_collect"
]
=
1
;
}
}
//查询客户是否在保护期内
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$user_service
=
new
UserService
();
$is_outstrip_twenty_four_hours
=
$user_service
->
isUserProtect
(
$v
[
"id"
]);
$is_outstrip_twenty_four_hours
=
$user_service
->
isUserProtect
(
$v
[
"id"
]);
$return_user_list
[
$k
][
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
$return_user_list
[
$k
][
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
...
...
application/index/service/UserService.php
View file @
5dd08ad7
...
@@ -13,6 +13,7 @@ use app\api_broker\service\PushMessageService;
...
@@ -13,6 +13,7 @@ use app\api_broker\service\PushMessageService;
use
app\extra\RedisExt
;
use
app\extra\RedisExt
;
use
app\index\validate\MemberValidate
;
use
app\index\validate\MemberValidate
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\ACollectUser
;
use
app\model\GOperatingRecords
;
use
app\model\GOperatingRecords
;
use
app\model\Users
;
use
app\model\Users
;
use
app\task\controller\ResultsSummaryNewTask
;
use
app\task\controller\ResultsSummaryNewTask
;
...
@@ -459,4 +460,24 @@ class UserService
...
@@ -459,4 +460,24 @@ class UserService
}
}
}
}
/**
* 查询客户是否被经纪人收藏
* @param $open_id
* @return bool
*/
public
function
isCollect
(
$agent_id
,
$user_id
){
$is_collect
=
2
;
if
(
$agent_id
&&
$user_id
){
$field
=
'id,status'
;
$get_params
[
'agents_id'
]
=
$agent_id
;
$get_params
[
'user_id'
]
=
$user_id
;
$collect_house
=
new
ACollectUser
();
$res
=
$collect_house
->
getCollectUser
(
$field
,
$get_params
);
if
(
$res
&&
(
$res
[
0
][
'status'
]
==
1
))
{
$is_collect
=
1
;
}
}
return
$is_collect
;
}
}
}
\ No newline at end of file
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