You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
36 lines
1.2 KiB
package com.threecloud.dataserviceyy.controller;
|
|
|
|
import com.threecloud.dataserviceyy.entity.ResultEntity;
|
|
import com.threecloud.dataserviceyy.service.VaaSyncService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
/**
|
|
* 语音同步接口
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/voice")
|
|
public class VoiceSyncController {
|
|
|
|
@Autowired
|
|
private VaaSyncService vaaSyncService;
|
|
|
|
/**
|
|
* 根据通话记录编号重新同步录音文件
|
|
*
|
|
* @param callRecordId 通话记录编号
|
|
* @return 操作结果
|
|
*/
|
|
@GetMapping("/resync")
|
|
public ResultEntity resync(@RequestParam("callRecordId") String callRecordId) {
|
|
try {
|
|
String msg = vaaSyncService.resyncByCallRecordId(callRecordId);
|
|
return new ResultEntity(ResultEntity.StatusCode.SUCCESS.getCode(), msg, null);
|
|
} catch (Exception e) {
|
|
return new ResultEntity(ResultEntity.StatusCode.FAILURE.getCode(), e.getMessage(), null);
|
|
}
|
|
}
|
|
}
|
|
|