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
ac6563e1
Commit
ac6563e1
authored
Mar 01, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通话列表分页
parent
4adc66fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
CellPhone.php
application/index/controller/CellPhone.php
+5
-2
SecretReport.php
application/model/SecretReport.php
+33
-0
No files found.
application/index/controller/CellPhone.php
View file @
ac6563e1
...
...
@@ -195,7 +195,8 @@ class CellPhone extends Basic
$where
[
'user_nick'
]
=
[
'LIKE'
,
$this
->
params
[
'client_name'
]
.
'%'
];
}
$data
=
$report
->
getCallList
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$data
[
'list'
]
=
$report
->
getCallList
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$data
[
'total'
]
=
$report
->
getCallListTotal
(
$where
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$data
);
}
...
...
@@ -233,7 +234,8 @@ class CellPhone extends Basic
$where
[
'phone'
]
=
[
$this
->
params
[
'phone'
]];
}
$data
=
$report
->
getCallCollect
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$data
[
'list'
]
=
$report
->
getCallCollect
(
$pageNo
,
$pageSize
,
'id desc'
,
$field
,
$where
);
$data
[
'total'
]
=
$report
->
getCallCollectTotal
(
$where
);
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
],
$data
);
}
}
\ No newline at end of file
application/model/SecretReport.php
View file @
ac6563e1
...
...
@@ -92,6 +92,25 @@ class SecretReport extends Model
return
$result
;
}
/**
* 通话记录总记录数
*
* @param $params
* @return int|string
*/
public
function
getCallListTotal
(
$params
)
{
if
(
$params
[
'realName'
]
||
$params
[
'user_nick'
])
{
$data
=
$this
->
alias
(
'a'
)
->
join
(
'agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
join
(
'u_users c'
,
'a.users_id=c.id'
,
'left'
)
->
where
(
$params
)
->
count
();
}
else
{
$data
=
$this
->
where
(
$params
)
->
count
();
}
return
$data
;
}
/**
* 经纪人拨打记录汇总
*
...
...
@@ -150,4 +169,18 @@ class SecretReport extends Model
return
$result
;
}
/**
* 经纪人拨打记录汇总总记录数
*
* @param $params
* @return int|string
*/
public
function
getCallCollectTotal
(
$params
)
{
return
$this
->
alias
(
'a'
)
->
join
(
'agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
where
(
$params
)
->
group
(
'agents_id'
)
->
count
();
}
}
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