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
d8c52f4c
Commit
d8c52f4c
authored
Dec 27, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据站点id组装站点名字
parent
c1c8f84c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
User.php
application/api_broker/controller/User.php
+2
-0
UserService.php
application/index/service/UserService.php
+30
-3
No files found.
application/api_broker/controller/User.php
View file @
d8c52f4c
...
@@ -188,6 +188,8 @@ class User extends Basic
...
@@ -188,6 +188,8 @@ class User extends Basic
$return_user_list
[
$k
][
'is_can_look'
]
=
$user_service
->
isUserAgentDirector
(
$v
[
"agent_id"
],
$this
->
agentId
);
$return_user_list
[
$k
][
'is_can_look'
]
=
$user_service
->
isUserAgentDirector
(
$v
[
"agent_id"
],
$this
->
agentId
);
$return_user_list
[
$k
][
'user_phone'
]
=
substr_replace
(
$return_user_list
[
$k
][
'user_phone'
],
'****'
,
3
,
4
);
$return_user_list
[
$k
][
'user_phone'
]
=
substr_replace
(
$return_user_list
[
$k
][
'user_phone'
],
'****'
,
3
,
4
);
$return_user_list
[
$k
][
'site_ids_name'
]
=
$user_service
->
userSiteName
(
$v
[
"site_ids"
]);
}
}
...
...
application/index/service/UserService.php
View file @
d8c52f4c
...
@@ -463,8 +463,9 @@ class UserService
...
@@ -463,8 +463,9 @@ class UserService
/**
/**
* 查询客户是否被经纪人收藏
* 查询客户是否被经纪人收藏
* @param $open_id
* @param $agent_id
* @return bool
* @param $user_id
* @return int
*/
*/
public
function
isCollect
(
$agent_id
,
$user_id
){
public
function
isCollect
(
$agent_id
,
$user_id
){
$is_collect
=
2
;
$is_collect
=
2
;
...
@@ -481,8 +482,33 @@ class UserService
...
@@ -481,8 +482,33 @@ class UserService
return
$is_collect
;
return
$is_collect
;
}
}
/**
* 根据站点id组装站点名字
* @param string $site
* @return string
*/
public
function
userSiteName
(
$site
=
'10001,10002'
){
if
(
!
$site
){
return
''
;
}
$site_name
=
[];
foreach
(
explode
(
','
,
$site
)
as
$k
=>
$v
){
switch
(
$v
)
{
case
10001
:
$site_name
[]
=
'上海市'
;
break
;
case
10002
:
$site_name
[]
=
'杭州市'
;
break
;
case
10003
:
$site_name
[]
=
'深圳市'
;
break
;
default
:
}
}
return
implode
(
','
,
$site_name
);
}
}
}
\ 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