package cn.gistack.sm.intelligentCall.controller;
|
|
import cn.gistack.sm.intelligentCall.service.CallService;
|
import io.swagger.annotations.Api;
|
import lombok.AllArgsConstructor;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springblade.core.tool.api.R;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
import java.util.*;
|
|
/**
|
* 智能呼叫控制层
|
* @author zhongrj
|
* @date 2023-04-21
|
*/
|
@Slf4j
|
@Api(tags = "智能呼叫")
|
@RestController
|
@RequestMapping("/call/call")
|
@AllArgsConstructor
|
public class CallController {
|
|
private final CallService callService;
|
|
/**
|
* 创建任务
|
* @return
|
*/
|
@GetMapping("/createCall")
|
public R createCall(){
|
List<Map<String,String>> list = new ArrayList<>();
|
Map<String,String> maps = new HashMap<>();
|
maps.put("phone","15170720695");
|
maps.put("name","测试水库");
|
maps.put("over","1.2");
|
maps.put("code","1241241122");
|
maps.put("userName","zrj");
|
maps.put("userId","123456");
|
list.add(maps);
|
callService.createTask(list);
|
// 返回
|
return R.status(true);
|
}
|
|
/**
|
* 获取通话详情
|
* @return
|
*/
|
@GetMapping("/getCallDetail")
|
public R getCallDetail(String taskId,String calleeNumber){
|
// 返回
|
return R.data(callService.getCallDetail(taskId,calleeNumber));
|
}
|
|
}
|