package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.FsChannelRecord;
import com.ruoyi.system.domain.FsChannelRecordVo;
import com.ruoyi.web.controller.manager.FsChannelRecordManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * packageName com.ruoyi.web.controller.system
 *
 * @author wangxy
 * @version JDK 8
 * @className OutboundController
 * @date 2024/4/7
 * @description 呼出通话
 */
@Controller
@RequestMapping("/outbound")
public class OutboundController extends BaseController {


    @Autowired
    private FsChannelRecordManager recordManager;

    private String prefix = "system/outbound";

    @GetMapping()
    public String outbound()
    {
        return prefix + "/outbound";
    }

    /**
     * 查询呼出列表
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(FsChannelRecord record)
    {
        startPage();
        List<FsChannelRecordVo> list = recordManager.selectOutboundList(record);
        return getDataTable(list);
    }
}
