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
abf9e488
Commit
abf9e488
authored
Aug 23, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询拨打次数
parent
7b74ff0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
CallPhoneService.php
application/api_broker/service/CallPhoneService.php
+14
-0
BindingPhone.php
application/model/BindingPhone.php
+27
-0
No files found.
application/api_broker/service/CallPhoneService.php
View file @
abf9e488
...
@@ -446,4 +446,17 @@ class CallPhoneService
...
@@ -446,4 +446,17 @@ class CallPhoneService
return
$id
;
return
$id
;
}
}
/**
* 查询经纪人与客户绑定数量
*
* @param $phone_a
* @param $phone_b
* @param $status
* @return int|string
*/
public
function
getBindNum
(
$phone_a
,
$phone_b
,
$status
)
{
$m_bind
=
new
BindingPhone
();
return
$m_bind
->
getCallNumber
(
$phone_a
,
$phone_b
,
$status
);
}
}
}
\ No newline at end of file
application/model/BindingPhone.php
View file @
abf9e488
...
@@ -187,4 +187,30 @@ class BindingPhone extends BaseModel
...
@@ -187,4 +187,30 @@ class BindingPhone extends BaseModel
->
count
();
->
count
();
return
$r
;
return
$r
;
}
}
/**
* 获取被拨打人的次数
*
* @param $phone_a
* @param $phone_b
* @param $status
* @return int|string
*/
public
function
getCallNumber
(
$phone_a
,
$phone_b
,
$status
=
0
)
{
if
(
$phone_a
)
{
$where
[
'phone_a'
]
=
$phone_a
;
}
if
(
$phone_b
)
{
$where
[
'phone_b'
]
=
$phone_b
;
}
if
(
$status
)
{
$where
[
'status'
]
=
$status
;
}
return
$this
->
where
(
$where
)
->
count
();
}
}
}
\ No newline at end of file
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