|
@@ -66,9 +66,10 @@ public class RealTimeController extends BaseController {
|
|
|
String filePath = RuoYiConfig.getUploadPath();
|
|
|
// 上传并返回新文件名称 /profile/upload/2024/11/04/合成音频_20241104180330A001.wav
|
|
|
String fileName = FileUploadUtils.upload(filePath, file);
|
|
|
+ System.out.println(fileName);
|
|
|
//本地文件路径替换
|
|
|
String replace = fileName.replace("/profile/upload", filePath);
|
|
|
-
|
|
|
+ System.out.println("本地文件路径" + replace);
|
|
|
HashMap<String, Object> map = new HashMap<>(16);
|
|
|
//String audioUrl = serverConfig.getUrl() + fileName;
|
|
|
//音频文件地址
|
|
@@ -87,7 +88,7 @@ public class RealTimeController extends BaseController {
|
|
|
//回调地址
|
|
|
//订单完成时回调该地址通知完成支持get 请求,我们会在回调地址中拼接参数,长度限制512: http://{ip}/{port}?xxx&OrderId=xxxx&status=1
|
|
|
//参数:orderId为订单号、status为订单状态: 1(转写识别成功) 、-1(转写识别失败)
|
|
|
- map.put("callbackUrl", "https://zxyyq.qs163.cn/prod-api/real/time/getResult/");
|
|
|
+ map.put("callbackUrl", "https://zxyyq.qs163.cn/prod-api/real/time/getResult");
|
|
|
String paramString = HttpUtil.parseMapToPathParam(map);
|
|
|
System.out.println("upload paramString:" + paramString);
|
|
|
|
|
@@ -130,8 +131,8 @@ public class RealTimeController extends BaseController {
|
|
|
* @throws InterruptedException
|
|
|
* @throws IOException
|
|
|
*/
|
|
|
- @GetMapping(value = "/getResult/{orderId}/{status}")
|
|
|
- private void getResult(@PathVariable("orderId") String orderId, @PathVariable("status") String status) throws SignatureException, InterruptedException, IOException {
|
|
|
+ @GetMapping(value = "/getResult")
|
|
|
+ private void getResult(String orderId, String status) throws SignatureException, InterruptedException, IOException {
|
|
|
if ("1".equals(status)) {
|
|
|
HashMap<String, Object> map = new HashMap<>(16);
|
|
|
map.put("orderId", orderId);
|
|
@@ -147,7 +148,7 @@ public class RealTimeController extends BaseController {
|
|
|
String response = HttpUtil.iflyrecGet(url);
|
|
|
JsonParse jsonParse = gson.fromJson(response, JsonParse.class);
|
|
|
if (jsonParse.content.orderInfo.status == 4 || jsonParse.content.orderInfo.status == -1) {
|
|
|
- System.out.println("订单完成:" + response);
|
|
|
+ //System.out.println("订单完成:" + response);
|
|
|
//处理返回值
|
|
|
/**
|
|
|
* {
|
|
@@ -189,6 +190,7 @@ public class RealTimeController extends BaseController {
|
|
|
//获取对应会议纪要id进行内容更新
|
|
|
Object recordId = redisCache.getCacheObject("xf:" + orderId);
|
|
|
if (ObjectUtil.isNotEmpty(recordId)) {
|
|
|
+ redisCache.deleteObject("xf:" + orderId);
|
|
|
MeetingRecords meetingRecords = new MeetingRecords();
|
|
|
meetingRecords.setRecordId(Long.parseLong(recordId.toString()));
|
|
|
meetingRecords.setRecordContent(resultText.toString());
|