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
670073b7
Commit
670073b7
authored
May 13, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载录音路径修改
parent
6c9657b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+10
-8
No files found.
application/task/controller/PrivacyNumber.php
View file @
670073b7
...
...
@@ -639,6 +639,10 @@ class PrivacyNumber
$result
=
[
$post_data
];
}
if
(
empty
(
$post_data
[
'record_down'
]))
{
return
json_encode
([
'code'
=>
1
,
'msg'
=>
'处理回调失败'
]);
}
foreach
(
$result
as
$k
=>
$v
)
{
if
(
empty
(
$v
[
'call_id'
])){
continue
;
...
...
@@ -648,19 +652,17 @@ class PrivacyNumber
continue
;
}
if
(
empty
(
$v
[
'record_down'
]))
{
continue
;
}
$where
[
'call_id'
]
=
$v
[
'call_id'
];
$
where
[
'call_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'call_time'
]
/
1000
);
$
call_time
=
date
(
'Y-m-d H:i:s'
,
$v
[
'call_time'
]
/
1000
);
$where
[
'call_time'
]
=
$call_time
;
//话单回调与录音回调两个值不一样
// $where['sub_id'] = (string)$v['subs_id'];
// $where[] = ['EXP', 'sub_id ="'.(string)$v['subs_id'].'"'];
try
{
$secret_data
=
$m_secret_report
->
getFindData
(
$filed_string
,
$where
);
$result_data
=
PlsDemo
::
queryRecordFileDownloadUrl
(
$v
[
'call_id'
],
$v
[
'call_time'
]);
if
(
empty
(
$secret_data
[
'voice_file'
])){
$result_data
=
PlsDemo
::
queryRecordFileDownloadUrl
(
$v
[
'call_id'
],
$call_time
);
}
}
catch
(
\Exception
$e
)
{
Log
::
write
(
$e
->
getMessage
(),
'voice_down_callBack_error'
);
//记录日志
return
json_encode
([
'code'
=>
1
,
'msg'
=>
'处理回调失败'
]);
...
...
@@ -669,7 +671,7 @@ class PrivacyNumber
if
(
isset
(
$result_data
->
Message
)
&&
$result_data
->
Message
==
'OK'
)
{
$down_url
=
isset
(
$result_data
->
DownloadUrl
)
?
explode
(
'?'
,
$result_data
->
DownloadUrl
)
:
$result_data
->
DownloadUrl
;
$file_name
=
basename
(
$down_url
[
0
]);
$is_down
=
down_file
(
$result_data
->
DownloadUrl
,
PHONE_VOICE
,
$file_name
,
date
(
'Y-m-d'
,
strtotime
(
$
v
[
'call_time'
]
)));
$is_down
=
down_file
(
$result_data
->
DownloadUrl
,
PHONE_VOICE
,
$file_name
,
date
(
'Y-m-d'
,
strtotime
(
$
call_time
)));
if
(
file_exists
(
$is_down
))
{
$update_data
[
$k
][
'id'
]
=
$secret_data
[
'id'
];
...
...
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