Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
8d8bb653
Commit
8d8bb653
authored
Mar 18, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
语音融合获取录音文件接口更换
parent
b9b4fbca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
3 deletions
+43
-3
FusionServiceImpl.java
...s/boot/module/jcs/biz/service/impl/FusionServiceImpl.java
+43
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FusionServiceImpl.java
View file @
8d8bb653
...
@@ -11,8 +11,10 @@ import org.springframework.util.MultiValueMap;
...
@@ -11,8 +11,10 @@ import org.springframework.util.MultiValueMap;
import
org.springframework.web.client.RestClientException
;
import
org.springframework.web.client.RestClientException
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
com.alibaba.fastjson.JSON
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -80,22 +82,60 @@ public class FusionServiceImpl implements IFusionService {
...
@@ -80,22 +82,60 @@ public class FusionServiceImpl implements IFusionService {
return
getResult
(
jsonObject
);
return
getResult
(
jsonObject
);
}
}
// @Override
// public Map<String, String> getCallRecordByCID(String cid) {
// MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<String, String>();
// requestEntity.add("CID", cid);
// JSONObject jsonObject = null;
// try {
// jsonObject = RestTemplateUtil.getRestInstance().postForObject(String.format("%s/GetCallRecordByCID", voiceURL), requestEntity, JSONObject.class);
// } catch (RestClientException e) {
// e.printStackTrace();
// throw new BadRequest("访问融合终端失败");
// }
// return getResult(jsonObject);
// }
@Override
@Override
public
Map
<
String
,
String
>
getCallRecordByCID
(
String
cid
)
{
public
Map
<
String
,
String
>
getCallRecordByCID
(
String
cid
)
{
MultiValueMap
<
String
,
String
>
requestEntity
=
new
LinkedMultiValueMap
<
String
,
String
>();
MultiValueMap
<
String
,
String
>
requestEntity
=
new
LinkedMultiValueMap
<
String
,
String
>();
requestEntity
.
add
(
"CID"
,
cid
);
requestEntity
.
add
(
"cid"
,
cid
);
requestEntity
.
add
(
"sliceIndex"
,
"0"
);
requestEntity
.
add
(
"sliceCount"
,
"1"
);
JSONObject
jsonObject
=
null
;
JSONObject
jsonObject
=
null
;
try
{
try
{
jsonObject
=
RestTemplateUtil
.
getRestInstance
().
postForObject
(
String
.
format
(
"%s/GetCallRecordByCID"
,
voiceURL
),
requestEntity
,
JSONObject
.
class
);
jsonObject
=
RestTemplateUtil
.
getRestInstance
().
postForObject
(
String
.
format
(
"%s/getRecordFilesByCID"
,
voiceURL
),
requestEntity
,
JSONObject
.
class
);
}
catch
(
RestClientException
e
)
{
}
catch
(
RestClientException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
BadRequest
(
"访问融合终端失败"
);
throw
new
BadRequest
(
"访问融合终端失败"
);
}
}
return
getResult
(
jsonObject
);
return
getResult
new
(
jsonObject
);
}
}
public
Map
<
String
,
String
>
getResultnew
(
JSONObject
jsonObject
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
mapDA
=
new
HashMap
<>();
if
(
ValidationUtil
.
isEmpty
(
jsonObject
))
{
throw
new
BadRequest
(
"访问融合终端失败"
);
}
JSONArray
data
=
jsonObject
.
getJSONArray
(
"data"
);
if
(!
ValidationUtil
.
isEmpty
(
data
))
{
map
=
(
Map
)
data
.
get
(
0
);
if
(
map
.
get
(
"sliceData"
)!=
null
){
List
<
Map
>
list
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
map
.
get
(
"sliceData"
)),
Map
.
class
);
mapDA
=
list
.
get
(
0
);
}
}
return
mapDA
;
}
@Override
@Override
public
JSONObject
selectAudioVideoRecords
(
public
JSONObject
selectAudioVideoRecords
(
...
...
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