package com.smartor.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.enums.BusinessType; import com.smartor.domain.IvrTaskcalldetail; import com.smartor.service.IIvrTaskcalldetailService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** * 语音任务呼叫明细Controller * * @author smartor * @date 2023-03-24 */ @RestController @RequestMapping("/smartor/ivrtaskcalldetail") public class IvrTaskcalldetailController extends BaseController { @Autowired private IIvrTaskcalldetailService ivrTaskcalldetailService; /** * 查询语音任务呼叫明细列表 */ @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:list')") @GetMapping("/list") public TableDataInfo list(IvrTaskcalldetail ivrTaskcalldetail) { startPage(); List list = ivrTaskcalldetailService.selectIvrTaskcalldetailList(ivrTaskcalldetail); return getDataTable(list); } /** * 导出语音任务呼叫明细列表 */ @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:export')") @Log(title = "语音任务呼叫明细", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, IvrTaskcalldetail ivrTaskcalldetail) { List list = ivrTaskcalldetailService.selectIvrTaskcalldetailList(ivrTaskcalldetail); ExcelUtil util = new ExcelUtil(IvrTaskcalldetail.class); util.exportExcel(response, list, "语音任务呼叫明细数据"); } /** * 获取语音任务呼叫明细详细信息 */ @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:query')") @GetMapping(value = "/{calldetailid}") public AjaxResult getInfo(@PathVariable("calldetailid") String calldetailid) { return success(ivrTaskcalldetailService.selectIvrTaskcalldetailByCalldetailid(calldetailid)); } /** * 新增语音任务呼叫明细 */ @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:add')") @Log(title = "语音任务呼叫明细", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody IvrTaskcalldetail ivrTaskcalldetail) { return toAjax(ivrTaskcalldetailService.insertIvrTaskcalldetail(ivrTaskcalldetail)); } /** * 修改语音任务呼叫明细 */ @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:edit')") @Log(title = "语音任务呼叫明细", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody IvrTaskcalldetail ivrTaskcalldetail) { return toAjax(ivrTaskcalldetailService.updateIvrTaskcalldetail(ivrTaskcalldetail)); } /** * 删除语音任务呼叫明细 */ @PreAuthorize("@ss.hasPermi('smartor:ivrtaskcalldetail:remove')") @Log(title = "语音任务呼叫明细", businessType = BusinessType.DELETE) @DeleteMapping("/{calldetailids}") public AjaxResult remove(@PathVariable String[] calldetailids) { return toAjax(ivrTaskcalldetailService.deleteIvrTaskcalldetailByCalldetailids(calldetailids)); } }