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
f4466621
Commit
f4466621
authored
Oct 10, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
085bf7a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
OperationData.php
application/index/controller/OperationData.php
+8
-8
AUserCallAgent.php
application/model/AUserCallAgent.php
+11
-0
No files found.
application/index/controller/OperationData.php
View file @
f4466621
...
...
@@ -11,6 +11,7 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\ADistrict
;
use
app\model\AUserCallAgent
;
use
app\model\ChatRelation
;
use
app\model\GHouses
;
use
app\model\OBargainModel
;
...
...
@@ -111,14 +112,13 @@ class OperationData extends Basic
$result_
[
"district_name"
]
=
$v
[
'district_name'
];
// 客户来电数
$params
=
[];
$params
[
"district_id"
]
=
$v
[
'id'
];
$params
[
"status"
]
=
0
;
//只查询正常状态的经纪人
$field
=
"sum(call_number) as call_number_total"
;
$agentModel
=
new
AAgents
();
$res
=
$agentModel
->
getUserPhoneNum
(
$field
,
$params
);
$result_
[
"user_phone_num"
]
=
isset
(
$res
[
0
][
"call_number_total"
])
?
$res
[
0
][
"call_number_total"
]
:
0
;;
$params
=
[];
$params
[
"b.district_id"
]
=
$v
[
'id'
];
$params
[
"a.status"
]
=
0
;
//只查询正常状态的经纪人
$model
=
new
AUserCallAgent
();
$res
=
$model
->
getUserCallAgentCount
(
$params
);
$result_
[
"user_phone_num"
]
=
isset
(
$res
)
?
$res
:
0
;;
$result
[]
=
$result_
;
}
return
$this
->
response
(
200
,
'success'
,
$result
);
...
...
application/model/AUserCallAgent.php
View file @
f4466621
...
...
@@ -34,6 +34,17 @@ class AUserCallAgent extends Model
return
$result
;
}
public
function
getUserCallAgentCount
(
$params
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
alias
(
'a'
)
->
join
(
"a_agents b"
,
"a.agent_id = b.id"
,
"left"
)
->
where
(
$params
)
->
count
();
//dump($this->getLastSql());
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