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
6341a110
Commit
6341a110
authored
Sep 24, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据经纪人手机号 获取经纪人全部账号
parent
f6791767
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
1 deletion
+56
-1
PayLogOpenService.php
application/api_broker/service/PayLogOpenService.php
+4
-1
VerifyService.php
application/api_broker/service/VerifyService.php
+52
-0
No files found.
application/api_broker/service/PayLogOpenService.php
View file @
6341a110
...
...
@@ -186,8 +186,11 @@ class PayLogOpenService
public
function
getOpenList
(
$agent_id
,
$status
,
$pageNo
,
$pageSize
)
{
$verifyService
=
new
VerifyService
();
$agent_ids
=
$verifyService
->
getAgentsByAgent
Id
(
$agent_id
);
$agent_ids
=
$verifyService
->
getAgentsByAgent
Phone
(
$agent_id
);
if
(
empty
(
$agent_ids
))
{
return
null
;
}
$where
[
'a.agent_id'
]
=
array
(
"in"
,
$agent_ids
);
$where
[
'a.status'
]
=
$status
;
$where
[
'a.is_del'
]
=
0
;
...
...
application/api_broker/service/VerifyService.php
View file @
6341a110
...
...
@@ -63,6 +63,58 @@ class VerifyService
return
null
;
}
/**
* 根据经纪人手机号 获取经纪人全部账号
*
* @param $agent_id
* @return int|string
*/
public
function
getAgentsByAgentPhone
(
$agent_id
)
{
$s_redis
=
new
RedisCacheService
();
$agent_data
=
$s_redis
->
getRedisCache
(
2
,
$agent_id
);
$params
[
"phone"
]
=
$agent_data
[
'phone'
];
$result
=
$this
->
agentModel
->
searchAgentsByKeyword
(
"id,store_id,district_id,level"
,
$params
);
$where
[
'status'
]
=
[
'in'
,
'0,3'
];
$id_string
=
''
;
foreach
(
$result
as
$value
)
{
switch
(
$value
[
"level"
])
{
case
10
:
return
$value
[
"id"
];
case
20
:
$where
[
'store_id'
]
=
$value
[
'store_id'
];
$arr_list
=
$this
->
agentModel
->
getAgentsByWhereColumn
(
$where
,
'id'
);
if
(
$arr_list
){
$id_string
.=
implode
(
','
,
$arr_list
)
.
','
;
}
break
;
case
30
:
$where
[
'district_id'
]
=
$value
[
'district_id'
];
$arr_list
=
$this
->
agentModel
->
getAgentsByWhereColumn
(
$where
,
'id'
);
if
(
$arr_list
)
{
$id_string
.=
implode
(
','
,
$arr_list
)
.
','
;
}
break
;
case
40
:
$where
[]
=
[
'EXP'
,
'district_id='
.
$value
[
'district_id'
]
.
' or store_id='
.
$value
[
'store_id'
]];
$arr_list
=
$this
->
agentModel
->
getAgentsByWhereColumn
(
$where
,
'id'
);
if
(
$arr_list
)
{
$id_string
.=
implode
(
','
,
$arr_list
)
.
','
;
}
break
;
default
:
return
$agent_id
;
break
;
}
}
if
(
isset
(
$id_string
))
{
$ids
=
rtrim
(
$id_string
,
','
);
}
else
{
$ids
=
0
;
}
return
$ids
;
}
/**
* @param $agent_id
...
...
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