guoshilong
2023-04-24 5c7dab639fffc0fe7d453c5c5153ddb6036fe45a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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));
    }
 
}