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
bdc55579
Commit
bdc55579
authored
Aug 16, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9b22d9f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
Performance.php
application/api_broker/controller/Performance.php
+3
-1
PerformanceService.php
application/api_broker/service/PerformanceService.php
+4
-3
VerifyService.php
application/api_broker/service/VerifyService.php
+21
-4
No files found.
application/api_broker/controller/Performance.php
View file @
bdc55579
...
@@ -174,8 +174,10 @@ class Performance extends Basic
...
@@ -174,8 +174,10 @@ class Performance extends Basic
Log
::
write
(
$params
,
'storeOrAgentSort'
);
//记录日志
Log
::
write
(
$params
,
'storeOrAgentSort'
);
//记录日志
//城市选择
//城市选择
$site_id
=
$params
[
"site_id"
]
?
$params
[
"site_id"
]
:
''
;
$site_id
=
$params
[
"site_id"
]
?
$params
[
"site_id"
]
:
''
;
$district_id
=
isset
(
$params
[
"district_id"
])
&&
$params
[
"district_id"
]
?
$params
[
"district_id"
]
:
''
;
try
{
try
{
$result
=
$this
->
service_
->
storeSortByDistrictId
(
$params
[
"agent_id"
],
$params
[
"is_store"
],
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$site_id
);
$result
=
$this
->
service_
->
storeSortByDistrictId
(
$params
[
"agent_id"
],
$params
[
"is_store"
],
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$site_id
,
$district_id
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
catch
(
Exception
$exception
)
{
}
catch
(
Exception
$exception
)
{
...
...
application/api_broker/service/PerformanceService.php
View file @
bdc55579
...
@@ -366,9 +366,10 @@ class PerformanceService
...
@@ -366,9 +366,10 @@ class PerformanceService
* @param $is_store
* @param $is_store
* @param $start_time
* @param $start_time
* @param $end_time
* @param $end_time
* @return array|false|null|\PDOStatement|string|\think\Collection
* @param $site_id
* @return false|null|\PDOStatement|string|\think\Collection
*/
*/
public
function
storeSortByDistrictId
(
$agent_id
,
$is_store
,
$start_time
,
$end_time
,
$site_id
)
public
function
storeSortByDistrictId
(
$agent_id
,
$is_store
,
$start_time
,
$end_time
,
$site_id
,
$district_id
)
{
{
$result
=
$this
->
agentModel
->
searchAgentsByKeyword
(
"id,store_id,district_id,level"
,
[
"id"
=>
$agent_id
]);
$result
=
$this
->
agentModel
->
searchAgentsByKeyword
(
"id,store_id,district_id,level"
,
[
"id"
=>
$agent_id
]);
...
@@ -378,7 +379,7 @@ class PerformanceService
...
@@ -378,7 +379,7 @@ class PerformanceService
}
}
$verify
=
new
VerifyService
();
$verify
=
new
VerifyService
();
$agent_ids
=
$verify
->
getAgentsByWhere
(
$agent_id
);
$agent_ids
=
$verify
->
getAgentsByWhere
(
$agent_id
,
$district_id
);
$params
[
"a.agent_id"
]
=
array
(
"in"
,
$agent_ids
);
$params
[
"a.agent_id"
]
=
array
(
"in"
,
$agent_ids
);
if
(
!
empty
(
$site_id
))
{
if
(
!
empty
(
$site_id
))
{
$where
[
'a.disc'
]
=
$site_id
;
$where
[
'a.disc'
]
=
$site_id
;
...
...
application/api_broker/service/VerifyService.php
View file @
bdc55579
...
@@ -177,13 +177,17 @@ class VerifyService
...
@@ -177,13 +177,17 @@ class VerifyService
/**
/**
* 经纪人身份验证 获取经纪人 不区分状态
* 经纪人身份验证 获取经纪人 不区分状态
* @param $agent_id
* @param $agent_id
* @param $district_id
* @return null|string
* @return null|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getAgentsByWhere
(
$agent_id
)
public
function
getAgentsByWhere
(
$agent_id
,
$district_id
)
{
{
if
(
$district_id
)
{
//存在区域id直接查分部信息
$ids
=
$this
->
getAgentsIdByDistrictId
();
return
$ids
;
}
$params
[
"id"
]
=
$agent_id
;
$params
[
"id"
]
=
$agent_id
;
$result
=
$this
->
agentModel
->
getAgentsByKeyword
(
"id,store_id,district_id,level"
,
$params
);
$result
=
$this
->
agentModel
->
getAgentsByKeyword
(
"id,store_id,district_id,level"
,
$params
);
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
...
@@ -215,6 +219,19 @@ class VerifyService
...
@@ -215,6 +219,19 @@ class VerifyService
return
null
;
return
null
;
}
}
public
function
getAgentsIdByDistrictId
(){
$arr_list
=
$this
->
agentModel
->
getAgentsByKeyword
(
"id"
,
[
"district_id"
=>
$district_id
]);
$ids
=
""
;
if
(
count
(
$arr_list
)
>
0
)
{
foreach
(
$arr_list
as
$item
)
{
$ids
.=
$item
[
"id"
]
.
","
;
}
$ids
=
rtrim
(
$ids
,
","
);
return
$ids
;
}
return
null
;
}
/**
/**
* @param $id
* @param $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