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
2145880e
Commit
2145880e
authored
Sep 03, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
释放不需要的号码
parent
99d86d75
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
0 deletions
+49
-0
BindingPhone.php
application/model/BindingPhone.php
+11
-0
route.php
application/route.php
+1
-0
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+37
-0
No files found.
application/model/BindingPhone.php
View file @
2145880e
...
@@ -259,4 +259,14 @@ class BindingPhone extends BaseModel
...
@@ -259,4 +259,14 @@ class BindingPhone extends BaseModel
public
function
updateAll
(
$data
)
{
public
function
updateAll
(
$data
)
{
return
$this
->
saveAll
(
$data
);
return
$this
->
saveAll
(
$data
);
}
}
/**
* @param $data
* @param $where
* @return BindingPhone
*/
public
function
updateData
(
$data
,
$where
)
{
return
$this
->
where
(
$where
)
->
update
(
$data
);
}
}
}
\ No newline at end of file
application/route.php
View file @
2145880e
...
@@ -768,6 +768,7 @@ Route::group('task', [
...
@@ -768,6 +768,7 @@ Route::group('task', [
'updateDownVoiceId'
=>
[
'task/PrivacyNumber/updateDownVoiceIdV2'
,
[
'method'
=>
'post | get'
]],
//更新下载数据库
'updateDownVoiceId'
=>
[
'task/PrivacyNumber/updateDownVoiceIdV2'
,
[
'method'
=>
'post | get'
]],
//更新下载数据库
'getVoiceByCallId'
=>
[
'task/PrivacyNumber/getVoiceByCallId'
,
[
'method'
=>
'post | get'
]],
//更新下载数据库
'getVoiceByCallId'
=>
[
'task/PrivacyNumber/getVoiceByCallId'
,
[
'method'
=>
'post | get'
]],
//更新下载数据库
'dateFilePath'
=>
[
'task/PrivacyNumber/dateFilePath'
,
[
'method'
=>
'post | get'
]],
//修改下载路径
'dateFilePath'
=>
[
'task/PrivacyNumber/dateFilePath'
,
[
'method'
=>
'post | get'
]],
//修改下载路径
'releasePhoneB'
=>
[
'task/PrivacyNumber/releasePhoneB'
,
[
'method'
=>
'post | get'
]],
//释放不需要的号码
'updateShopTask'
=>
[
'task/JobTask/updateShopTask'
,
[
'method'
=>
'post | get'
]],
//默认跟进
'updateShopTask'
=>
[
'task/JobTask/updateShopTask'
,
[
'method'
=>
'post | get'
]],
//默认跟进
'updateShopImageIdTask'
=>
[
'task/JobTask/updateShopImageIdTask'
,
[
'method'
=>
'post | get'
]],
//默认图片
'updateShopImageIdTask'
=>
[
'task/JobTask/updateShopImageIdTask'
,
[
'method'
=>
'post | get'
]],
//默认图片
'image'
=>
[
'task/JobTask/image'
,
[
'method'
=>
'post | get'
]],
//压缩图片
'image'
=>
[
'task/JobTask/image'
,
[
'method'
=>
'post | get'
]],
//压缩图片
...
...
application/task/controller/PrivacyNumber.php
View file @
2145880e
...
@@ -16,6 +16,7 @@ use app\api_broker\untils\RongDemo;
...
@@ -16,6 +16,7 @@ use app\api_broker\untils\RongDemo;
use
app\extra\RedisExt
;
use
app\extra\RedisExt
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\AAgentsPhone
;
use
app\model\AAgentsPhone
;
use
app\model\AliYunPhone
;
use
app\model\AliYunSecretReport
;
use
app\model\AliYunSecretReport
;
use
app\model\AliyunVoiceDown
;
use
app\model\AliyunVoiceDown
;
use
app\model\BindingPhone
;
use
app\model\BindingPhone
;
...
@@ -640,6 +641,42 @@ class PrivacyNumber
...
@@ -640,6 +641,42 @@ class PrivacyNumber
return
;
return
;
}
}
/**
* 释放不需要的号码
*/
public
function
releasePhoneB
()
{
if
(
empty
(
$_GET
[
'phone_x'
]))
{
return
Response
::
create
([
'code'
=>
101
,
'msg'
=>
'参数错误'
,
'data'
=>
''
],
'json'
);
}
$m_phone
=
new
AliYunPhone
();
$phone_x_id
=
$m_phone
->
getFieldOneValue
(
'id'
,
[
'phone_x'
=>
$_GET
[
'phone_x'
],
'status'
=>
[
'<'
,
3
]]);
if
(
empty
(
$phone_x_id
))
{
return
Response
::
create
([
'code'
=>
101
,
'msg'
=>
'没有该号码'
,
'data'
=>
''
],
'json'
);
}
$where
[
'aliYun_phone_id'
]
=
$phone_x_id
;
$where
[
'status'
]
=
1
;
$total
=
$this
->
m_bind
->
getTotal
(
$where
);
$page_size
=
100
;
$page_total
=
ceil
(
$total
/
$page_size
);
$call
=
new
CallPhoneService
();
$num
=
0
;
for
(
$i
=
0
;
$i
<
$page_total
;
$i
++
)
{
$phone_data
=
$this
->
m_bind
->
getList
(
$i
,
$page_size
,
''
,
'id,phone_a,phone_b,subsId'
,
$where
);
foreach
(
$phone_data
as
$k
=>
$v
)
{
$info
=
$this
->
redis
->
get
(
$v
[
'phone_a'
]
.
'_'
.
$_GET
[
'phone_x'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_1'
);
$id
=
explode
(
'_'
,
$info
);
$call
->
agentsUnBindRedis
(
$v
[
'phone_a'
],
$v
[
'phone_b'
],
$_GET
[
'phone_x'
],
0
,
$id
[
0
]);
$id_array
[]
=
$v
[
'id'
];
}
if
(
isset
(
$id_array
))
{
$num
+=
$this
->
m_bind
->
updateData
([
'status'
=>
0
],
[
'id'
=>
[
'in'
,
$id_array
]]);
}
}
return
Response
::
create
([
'code'
=>
200
,
'msg'
=>
''
,
'data'
=>
'释放数量:'
.
$num
],
'json'
);
}
/**
/**
* 阿里云回调下载录音
* 阿里云回调下载录音
*/
*/
...
...
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