优化呼出接口
This commit is contained in:
@@ -11,7 +11,7 @@ import com.cool.store.request.CallUpReq;
|
||||
* @Description:
|
||||
*/
|
||||
public interface CallService {
|
||||
void callUp(CallUpReq request) throws ApiException;
|
||||
String callUp(CallUpReq request) throws ApiException;
|
||||
void callFinishBack(CallFinishBackReq request) throws ApiException;
|
||||
void callRecordBack(CallRecordBackReq request) throws ApiException;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class CallServiceImpl implements CallService {
|
||||
@Autowired
|
||||
private HyOutboundMobileMapper hyOutboundMobileMapper;
|
||||
@Override
|
||||
public void callUp(CallUpReq request) throws ApiException {
|
||||
public String callUp(CallUpReq request) throws ApiException {
|
||||
try {
|
||||
//校验拨出手机号APP是否在线
|
||||
boolean isOnline = WebSocketServer.isOnline(request.getOutgoingMobile());
|
||||
@@ -70,6 +70,7 @@ public class CallServiceImpl implements CallService {
|
||||
|
||||
//保存通话记录
|
||||
callRecordMapper.insertSelective(callRecordDO);
|
||||
return transNo;
|
||||
} catch (Exception e) {
|
||||
log.error("callUp error, request:{}", JSON.toJSONString(request), e);
|
||||
throw new ApiException(ErrorCodeEnum.CALL_UP_ERROR);
|
||||
|
||||
@@ -33,8 +33,8 @@ public class CallController {
|
||||
@PostMapping("/callUp")
|
||||
@ApiOperation("呼出电话")
|
||||
public ResponseResult callUp(@RequestBody CallUpReq request) throws ApiException {
|
||||
callService.callUp(request);
|
||||
return ResponseResult.success();
|
||||
String res = callService.callUp(request);
|
||||
return ResponseResult.success(res);
|
||||
}
|
||||
|
||||
@PostMapping("/finish/callback")
|
||||
|
||||
Reference in New Issue
Block a user