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
e8b2e1cc
Commit
e8b2e1cc
authored
Jun 12, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msg
parent
ce5f6cdc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
OfficeBroker.php
application/api/controller/OfficeBroker.php
+16
-15
No files found.
application/api/controller/OfficeBroker.php
View file @
e8b2e1cc
...
...
@@ -48,29 +48,30 @@ class OfficeBroker extends Basic
$fields
=
'a.id,name,phone,COUNT(b.id) evaluate,sum(evaluate_grade) as evaluate_grade,a.img'
;
$agent_client
=
0
;
if
(
!
empty
(
$this
->
userId
)
&&
(
$this
->
params
[
'source'
]
!=
'B-APP'
))
{
$agent_client
=
$agents
->
getAgentClient
(
$fields
,
[
'c.id'
=>
$this
->
userId
,
'a.status'
=>
0
]);
}
//去除分享的商铺
if
(
empty
(
$this
->
params
[
'share'
]))
{
//查找30天带看最多的人
$m_march
=
new
OfficeOMarchInModel
();
$report_fields
=
'COUNT( a.reception_id ) AS num,a.reception_id '
;
$report_where
[
'b.house_id'
]
=
$params
[
'house_id'
];
$report_where
[
'a.create_time'
]
=
[
'between'
,
[
date
(
'Y-m-d'
,
strtotime
(
"-30 day"
))
.
' 00:00:00'
,
date
(
'Y-m-d'
)
.
' 23:59:59'
]];
$reception_id
=
$m_march
->
getMaxMarchInAgent
(
$report_fields
,
$report_where
);
}
$where
[
'c.type'
]
=
2
;
//去除分享的商铺
if
(
empty
(
$this
->
params
[
'share'
]))
{
//查找30天带看最多的人
$m_march
=
new
OfficeOMarchInModel
();
$report_fields
=
'COUNT( a.reception_id ) AS num,a.reception_id '
;
$report_where
[
'b.house_id'
]
=
$params
[
'house_id'
];
$report_where
[
'a.create_time'
]
=
[
'between'
,
[
date
(
'Y-m-d'
,
strtotime
(
"-30 day"
))
.
' 00:00:00'
,
date
(
'Y-m-d'
)
.
' 23:59:59'
]];
$reception_id
=
$m_march
->
getMaxMarchInAgent
(
$report_fields
,
$report_where
);
}
if
(
!
empty
(
$reception_id
[
'reception_id'
]))
{
$report_agent
=
$agents
->
getUserOffice
(
1
,
1
,
''
,
$fields
,
[
'a.id'
=>
$reception_id
[
'reception_id'
],
'a.status'
=>
0
,
'c.is_del'
=>
0
]);
if
(
!
empty
(
$reception_id
[
'reception_id'
]))
{
$report_agent
=
$agents
->
getUserOffice
(
1
,
1
,
''
,
$fields
,
[
'a.id'
=>
$reception_id
[
'reception_id'
],
'a.status'
=>
0
,
'c.is_del'
=>
0
]);
}
}
else
{
$where
[
'c.type'
]
=
1
;
}
$where
[
'c.house_id'
]
=
$params
[
'house_id'
];
$where
[
'c.is_del'
]
=
0
;
$where
[
'a.status'
]
=
0
;
$where
[
'c.type'
]
=
2
;
$list
=
$agents
->
getUserOffice
(
$pageNo
,
$pageSize
,
'evaluate desc'
,
$fields
,
$where
);
$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