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); } } }