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
6522307a
Commit
6522307a
authored
Jul 10, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
600db3b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
3 deletions
+27
-3
Performance.php
application/api_broker/controller/Performance.php
+0
-1
PerformanceService.php
application/api_broker/service/PerformanceService.php
+6
-2
UserAgentModel.php
application/model/UserAgentModel.php
+21
-0
No files found.
application/api_broker/controller/Performance.php
View file @
6522307a
...
...
@@ -595,7 +595,6 @@ class Performance extends Basic
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$result
=
$this
->
service_
->
getUserResourceListPcInfo
(
$params
[
"id"
],
$params
[
"type"
],
$start_day
,
$end_day
,
$page_no
,
$page_size
,
$this
->
siteId
);
if
(
$result
[
"code"
]
==
101
)
{
...
...
application/api_broker/service/PerformanceService.php
View file @
6522307a
...
...
@@ -2,6 +2,7 @@
namespace
app\api_broker\service
;
use
app\index\service\UserAgentService
;
use
app\model\AAgents
;
use
app\model\ASuperviseModel
;
use
app\model\GHouses
;
...
...
@@ -756,8 +757,11 @@ class PerformanceService
$params
=
$this
->
getAgentIdPcInfo
(
$id
,
$type
,
$start_time
,
$end_time
);
if
(
!
$params
)
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.user_name,a.user_phone,a.user_nick,a.create_time,a.agent_id,a.user_status,a.source,a.industry_type,a.area_demand,b.name"
;
$addUserList
=
$this
->
userModel
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
$field
=
"a.id,b.user_name,b.user_phone,b.user_nick,a.create_time,a.agent_id,b.user_status,b.source,
b.industry_type,b.area_demand,c.name"
;
$m_user_agent
=
new
UserAgentModel
();
$addUserList
=
$m_user_agent
->
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
);
foreach
(
$addUserList
as
$key
=>
$val
)
{
if
(
$val
[
"agent_id"
]
==
$id
)
{
$addUserList
[
$key
][
"is_my"
]
=
1
;
...
...
application/model/UserAgentModel.php
View file @
6522307a
...
...
@@ -121,4 +121,25 @@ class UserAgentModel extends Model
->
where
(
$where
)
->
select
();
}
public
function
getAddUserList
(
$params
,
$field
,
$page_no
,
$page_size
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'u_users b'
,
'a.user_id = b.id'
,
'left'
)
->
join
(
'a_agents c'
,
'a.agent_id = c.id'
,
'left'
)
->
where
(
$where_
)
->
limit
(
$page_size
)
->
page
(
$page_no
)
->
select
();
return
$result
;
}
}
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