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
9d6ae8b3
Commit
9d6ae8b3
authored
Nov 19, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huancun
parent
94de1030
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
4 deletions
+50
-4
PerformanceService.php
application/api_broker/service/PerformanceService.php
+1
-1
VerifyService.php
application/api_broker/service/VerifyService.php
+44
-0
AAgents.php
application/model/AAgents.php
+5
-3
No files found.
application/api_broker/service/PerformanceService.php
View file @
9d6ae8b3
...
...
@@ -374,7 +374,7 @@ class PerformanceService
}
$verify
=
new
VerifyService
();
$agent_ids
=
$verify
->
getAgentsBy
AgentId
(
$agent_id
);
$agent_ids
=
$verify
->
getAgentsBy
Where
(
$agent_id
);
$params
[
"a.agent_id"
]
=
array
(
"in"
,
$agent_ids
);
if
(
!
empty
(
$site_id
))
{
$where
[
'a.disc'
]
=
$site_id
;
...
...
application/api_broker/service/VerifyService.php
View file @
9d6ae8b3
...
...
@@ -59,6 +59,50 @@ class VerifyService
return
null
;
}
/**
* 经纪人身份验证 获取经纪人
* @param $agent_id
* @return null|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getAgentsByWhere
(
$agent_id
)
{
$params
[
"id"
]
=
$agent_id
;
$result
=
$this
->
agentModel
->
searchAgentsByKeyword
(
"id,store_id,district_id,level"
,
$params
);
if
(
count
(
$result
)
>
0
)
{
$arr_list
=
[];
switch
(
$result
[
0
][
"level"
])
{
case
10
:
return
$result
[
0
][
"id"
];
case
20
:
$arr_list
=
$this
->
agentModel
->
searchAgentsByKeyword
(
"id"
,
[
"store_id"
=>
$result
[
0
][
"store_id"
],
"status"
=>
"-1"
]);
break
;
case
30
:
case
40
:
$arr_list
=
$this
->
agentModel
->
searchAgentsByKeyword
(
"id"
,
[
"district_id"
=>
$result
[
0
][
"district_id"
],
"status"
=>
"-1"
]);
break
;
default
:
return
$agent_id
;
break
;
}
$ids
=
""
;
if
(
count
(
$arr_list
)
>
0
)
{
foreach
(
$arr_list
as
$item
)
{
$ids
.=
$item
[
"id"
]
.
","
;
}
}
$ids
=
rtrim
(
$ids
,
","
);
return
$ids
;
}
return
null
;
}
public
function
getAgentsByAgentIdPcInfo
(
$id
,
$type
)
{
$arr_list
=
[];
...
...
application/model/AAgents.php
View file @
9d6ae8b3
...
...
@@ -664,9 +664,11 @@ class AAgents extends BaseModel
*/
public
function
searchAgentsByKeyword
(
$field
,
$params
)
{
$params
[
"status"
]
=
array
(
"in"
,
"0,3"
);
if
(
isset
(
$params
[
"status"
])
&&
$params
[
"status"
]
==
"-1"
){
unset
(
$params
[
"status"
]);
}
else
{
$params
[
"status"
]
=
array
(
"in"
,
"0,3"
);
}
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
$params
)
...
...
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