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
4a1d1177
Commit
4a1d1177
authored
Dec 03, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理经纪人号码用完释放
parent
b1c7cba7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
17 deletions
+30
-17
route.php
application/route.php
+4
-6
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+26
-11
No files found.
application/route.php
View file @
4a1d1177
...
...
@@ -494,12 +494,10 @@ Route::group('task', [
'queryRecordFile'
=>
[
'task/PrivacyNumber/queryRecordFile'
,
[
'method'
=>
'get'
]],
//下载录音
'releaseNumber'
=>
[
'task/PrivacyNumber/releaseNumber'
,
[
'method'
=>
'get'
]],
//释放号码
'checkBindPhone'
=>
[
'task/PrivacyNumber/checkBindPhone'
,
[
'method'
=>
'get'
]],
//检查绑定关系,去除表中不存在的绑定关系
'totalAgentCall'
=>
[
'task/PrivacyNumber/totalAgentCall'
,
[
'method'
=>
'get'
]],
//统计每天经纪人拨打电话
'oldTotalAgentCall'
=>
[
'task/PrivacyNumber/oldTotalAgentCall'
,
[
'method'
=>
'get'
]],
//历史数据拨打数据
'updateStatusByTime'
=>
[
'task/updateShopStatusTask/updateStatusByTime'
,
[
'method'
=>
'get'
]],
//修改上下架
'updateStatusByNum'
=>
[
'task/updateShopStatusTask/updateStatusByNum'
,
[
'method'
=>
'get'
]],
//修改下架根据数量
'totalAgentCall'
=>
[
'task/PrivacyNumber/totalAgentCall'
,
[
'method'
=>
'get'
]],
//统计每天经纪人拨打电话
'delBindPhone'
=>
[
'task/PrivacyNumber/delBindPhone'
,
[
'method'
=>
'get'
]],
//处理经纪人号码用完释放
'updateStatusByTime'
=>
[
'task/updateShopStatusTask/updateStatusByTime'
,
[
'method'
=>
'get'
]],
//修改上下架
'updateStatusByNum'
=>
[
'task/updateShopStatusTask/updateStatusByNum'
,
[
'method'
=>
'get'
]],
//修改下架根据数量
'saveLookShop'
=>
[
'task/SaveLookShopHistoryTask/saveLookShop'
,
[
'method'
=>
'get'
]],
//保存看铺记录
...
...
application/task/controller/PrivacyNumber.php
View file @
4a1d1177
...
...
@@ -584,19 +584,33 @@ class PrivacyNumber
}
/**
*
历史数据
*
处理经纪人号码用完释放
*/
public
function
oldTotalAgentCall
()
{
$month
=
[
'2018-03'
,
'2018-04'
,
'2018-05'
,
'2018-06'
,
'2018-07'
,
'2018-08'
,
'2018-09'
,
'2018-10'
,
'2018-11'
];
// $month = ['2018-11'];
foreach
(
$month
as
$v
)
{
$firstday
=
date
(
'Y-m-01'
,
strtotime
(
$v
));
$lastday
=
date
(
'd'
,
strtotime
(
"
$firstday
+1 month -1 day"
));
for
(
$i
=
1
;
$i
<=
$lastday
;
$i
++
)
{
$this
->
totalAgentCall
(
$v
.
'-'
.
$i
);
public
function
delBindPhone
()
{
Request
::
instance
()
->
get
();
$where
[
'phone_a'
]
=
$_GET
[
'phone_a'
];
$start_time
=
date
(
'Y-m-d'
,
strtotime
(
$_GET
[
'start_time'
]));
$end_time
=
date
(
'Y-m-d'
,
strtotime
(
$_GET
[
'end_time'
]));
$where
[
'a.create_time'
]
=
[
'between'
,
[
$start_time
.
' 00:00:00'
,
$end_time
.
' 23:59:59'
]];
$data
=
$this
->
m_bind
->
getBindingPhoneList
(
'a.phone_a,a.phone_b,b.phone_x,b.subsId'
,
$where
);
$key
=
0
;
foreach
(
$data
as
$k
=>
$v
)
{
$agent_where
[
'phone'
]
=
$v
[
'phone_a'
];
$agent_where
[
'status'
]
=
0
;
$agent_id
=
$this
->
m_agent
->
getAgentsByWhere
(
$agent_where
,
'id'
);
if
(
empty
(
$agent_id
))
{
$phone_where
[
'phone'
]
=
$v
[
'phone_a'
];
$phone_where
[
'status'
]
=
0
;
$agent_id
=
$this
->
m_agent_phone
->
getAgentsByWhere
(
$phone_where
,
'agents_id'
);
}
$call
=
new
CallPhoneService
();
$call
->
agentsUnBindRedis
(
$v
[
'phone_a'
],
$v
[
'phone_b'
],
$v
[
'phone_x'
],
0
,
$agent_id
);
$key
++
;
}
echo
'释放:'
.
$key
.
'组'
;
return
;
}
}
\ 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