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
20b1ca3f
Commit
20b1ca3f
authored
Aug 30, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
录音
parent
6e2d1296
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
7 deletions
+29
-7
SecretReport.php
application/model/SecretReport.php
+1
-1
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+28
-6
No files found.
application/model/SecretReport.php
View file @
20b1ca3f
...
@@ -65,7 +65,7 @@ class SecretReport extends BaseModel
...
@@ -65,7 +65,7 @@ class SecretReport extends BaseModel
}
}
if
(
$v
->
voice_file
)
{
if
(
$v
->
voice_file
)
{
$result
[
$k
][
'voice_file'
]
=
'http://
192.168.0.22
/static/voice/'
.
$v
->
voice_file
;
$result
[
$k
][
'voice_file'
]
=
'http://
file.tonglianjituan.com
/static/voice/'
.
$v
->
voice_file
;
}
else
{
}
else
{
$result
[
$k
][
'voice_file'
]
=
""
;
$result
[
$k
][
'voice_file'
]
=
""
;
}
}
...
...
application/task/controller/PrivacyNumber.php
View file @
20b1ca3f
...
@@ -75,22 +75,42 @@ class PrivacyNumber
...
@@ -75,22 +75,42 @@ class PrivacyNumber
public
function
queryRecordFile
()
public
function
queryRecordFile
()
{
{
set_time_limit
(
0
);
set_time_limit
(
0
);
$param
=
Request
::
instance
()
->
param
();
if
(
empty
(
$param
[
'record_down'
])
&&
$param
[
'record_down'
]
>
2
)
{
return
json_encode
([
'code'
=>
101
,
'msg'
=>
'参数错误'
]);
}
if
(
$param
[
'record_down'
]
==
1
)
{
$where
[
'record_down'
]
=
0
;
}
if
(
$param
[
'record_down'
]
==
2
)
{
$where
[
'record_down'
]
=
1
;
}
$m_secret
=
new
AliYunSecretReport
();
$m_secret
=
new
AliYunSecretReport
();
$fields
=
'id,call_id,call_time,voice_file,type'
;
$fields
=
'id,call_id,call_time,voice_file,type
,record_down
'
;
$where
[
'record_down'
]
=
0
;
$where
[
'time'
]
=
[
'>'
,
0
];
$where
[
'time'
]
=
[
'>'
,
0
];
$where
[
'type'
]
=
[
'>'
,
0
];
$where
[
'type'
]
=
[
'>'
,
0
];
$down_data
=
$m_secret
->
secretReportAll
(
$fields
,
$where
);
$down_data
=
$m_secret
->
secretReportAll
(
$fields
,
$where
);
$is_down
=
''
;
$is_down
=
''
;
foreach
(
$down_data
as
$k
=>
$v
)
{
foreach
(
$down_data
as
$k
=>
$v
)
{
if
(
$v
[
'type'
]
==
1
)
{
if
(
$v
[
'type'
]
==
1
)
{
/*阿里云音频下载*/
/*阿里云音频下载*/
$result_data
=
PlsDemo
::
queryRecordFileDownloadUrl
(
$v
[
'call_id'
],
$v
[
'call_time'
]);
$result_data
=
PlsDemo
::
queryRecordFileDownloadUrl
(
$v
[
'call_id'
],
$v
[
'call_time'
]);
if
(
isset
(
$result_data
->
Message
)
&&
$result_data
->
Message
==
'OK'
)
{
if
(
isset
(
$result_data
->
Message
)
&&
$result_data
->
Message
==
'OK'
)
{
$down_url
=
isset
(
$result_data
->
DownloadUrl
)
?
explode
(
'?'
,
$result_data
->
DownloadUrl
)
:
$result_data
->
DownloadUrl
;
$down_url
=
isset
(
$result_data
->
DownloadUrl
)
?
explode
(
'?'
,
$result_data
->
DownloadUrl
)
:
$result_data
->
DownloadUrl
;
$is_down
=
down_file
(
$result_data
->
DownloadUrl
,
PHONE_VOICE
,
basename
(
$down_url
[
0
]));
if
(
$param
[
'record_down'
]
==
1
)
{
$file_name
=
basename
(
$down_url
[
0
]);
}
else
{
$file_name
=
pathinfo
(
$v
[
'voice_file'
]);
$file_name
=
$file_name
[
'filename'
];
}
$is_down
=
down_file
(
$result_data
->
DownloadUrl
,
PHONE_VOICE
,
$file_name
);
}
}
}
elseif
(
$v
[
'type'
]
==
2
)
{
}
elseif
(
$v
[
'type'
]
==
2
)
{
/*容联云音频下载*/
/*容联云音频下载*/
...
@@ -98,8 +118,10 @@ class PrivacyNumber
...
@@ -98,8 +118,10 @@ class PrivacyNumber
}
}
if
(
file_exists
(
$is_down
))
{
if
(
file_exists
(
$is_down
))
{
$data
[
'record_down'
]
=
1
;
$data
[
'record_down'
]
=
empty
(
$v
[
'record_down'
])
?
1
:
2
;
$data
[
'voice_file'
]
=
date
(
'Ymd'
)
.
'/'
.
basename
(
$is_down
);
if
(
$data
[
'record_down'
]
==
1
)
{
$data
[
'voice_file'
]
=
date
(
'Ymd'
)
.
'/'
.
basename
(
$is_down
);
}
$m_secret
->
updateDownStatus
(
$v
[
'id'
],
$data
);
$m_secret
->
updateDownStatus
(
$v
[
'id'
],
$data
);
}
}
}
}
...
...
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