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
b9679902
Commit
b9679902
authored
Aug 16, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bdc55579
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
26 deletions
+4
-26
Performance.php
application/api_broker/controller/Performance.php
+1
-3
PerformanceService.php
application/api_broker/service/PerformanceService.php
+2
-2
VerifyService.php
application/api_broker/service/VerifyService.php
+1
-21
No files found.
application/api_broker/controller/Performance.php
View file @
b9679902
...
@@ -171,13 +171,11 @@ class Performance extends Basic
...
@@ -171,13 +171,11 @@ class Performance extends Basic
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"start_time"
])
||
!
isset
(
$params
[
"end_time"
])
||
!
isset
(
$params
[
"site_id"
]))
{
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"start_time"
])
||
!
isset
(
$params
[
"end_time"
])
||
!
isset
(
$params
[
"site_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
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"
],
$result
=
$this
->
service_
->
storeSortByDistrictId
(
$params
[
"agent_id"
],
$params
[
"is_store"
],
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$site_id
,
$district_id
);
$params
[
"start_time"
],
$params
[
"end_time"
]
.
" 23:59:59"
,
$site_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 @
b9679902
...
@@ -369,7 +369,7 @@ class PerformanceService
...
@@ -369,7 +369,7 @@ class PerformanceService
* @param $site_id
* @param $site_id
* @return false|null|\PDOStatement|string|\think\Collection
* @return false|null|\PDOStatement|string|\think\Collection
*/
*/
public
function
storeSortByDistrictId
(
$agent_id
,
$is_store
,
$start_time
,
$end_time
,
$site_id
,
$district_id
)
public
function
storeSortByDistrictId
(
$agent_id
,
$is_store
,
$start_time
,
$end_time
,
$site_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
]);
...
@@ -379,7 +379,7 @@ class PerformanceService
...
@@ -379,7 +379,7 @@ class PerformanceService
}
}
$verify
=
new
VerifyService
();
$verify
=
new
VerifyService
();
$agent_ids
=
$verify
->
getAgentsByWhere
(
$agent_id
,
$district_id
);
$agent_ids
=
$verify
->
getAgentsByWhere
(
$agent_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 @
b9679902
...
@@ -177,17 +177,10 @@ class VerifyService
...
@@ -177,17 +177,10 @@ class VerifyService
/**
/**
* 经纪人身份验证 获取经纪人 不区分状态
* 经纪人身份验证 获取经纪人 不区分状态
* @param $agent_id
* @param $agent_id
* @param $district_id
* @return null|string
* @return null|string
*/
*/
public
function
getAgentsByWhere
(
$agent_id
,
$district_id
)
public
function
getAgentsByWhere
(
$agent_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
)
{
...
@@ -219,19 +212,6 @@ class VerifyService
...
@@ -219,19 +212,6 @@ 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