| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | 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.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.IvrLibaExtemplatescript; |
| | | import com.smartor.service.IIvrLibaExtemplatescriptService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 扩展话术模板库话术Controller |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-22 |
| | | * 通用模板话术Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2023-12-27 |
| | | */ |
| | | @Api(description = "通用模板话术") |
| | | @RestController |
| | | @RequestMapping("/smartor/ivrextemplatescript") |
| | | public class IvrLibaExtemplatescriptController extends BaseController |
| | | { |
| | | @RequestMapping("/smartor/extemplatescript") |
| | | public class IvrLibaExtemplatescriptController extends BaseController { |
| | | @Autowired |
| | | private IIvrLibaExtemplatescriptService ivrLibaExtemplatescriptService; |
| | | |
| | | /** |
| | | * 查询扩展话术模板库话术列表 |
| | | * 查询通用模板话术列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplatescript:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrLibaExtemplatescript ivrLibaExtemplatescript) |
| | | { |
| | | @ApiOperation("查询通用模板话术列表") |
| | | @PreAuthorize("@ss.hasPermi('smartor:extemplatescript:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrLibaExtemplatescript ivrLibaExtemplatescript) { |
| | | startPage(); |
| | | List<IvrLibaExtemplatescript> list = ivrLibaExtemplatescriptService.selectIvrLibaExtemplatescriptList(ivrLibaExtemplatescript); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出扩展话术模板库话术列表 |
| | | * 导出通用模板话术列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplatescript:export')") |
| | | @Log(title = "扩展话术模板库话术", businessType = BusinessType.EXPORT) |
| | | @ApiOperation("导出通用模板话术列表") |
| | | @PreAuthorize("@ss.hasPermi('smartor:extemplatescript:export')") |
| | | @Log(title = "通用模板话术", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrLibaExtemplatescript ivrLibaExtemplatescript) |
| | | { |
| | | public void export(HttpServletResponse response, IvrLibaExtemplatescript ivrLibaExtemplatescript) { |
| | | List<IvrLibaExtemplatescript> list = ivrLibaExtemplatescriptService.selectIvrLibaExtemplatescriptList(ivrLibaExtemplatescript); |
| | | ExcelUtil<IvrLibaExtemplatescript> util = new ExcelUtil<IvrLibaExtemplatescript>(IvrLibaExtemplatescript.class); |
| | | util.exportExcel(response, list, "扩展话术模板库话术数据"); |
| | | util.exportExcel(response, list, "通用模板话术数据"); |
| | | } |
| | | |
| | | /** |
| | | * 获取扩展话术模板库话术详细信息 |
| | | * 获取通用模板话术详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplatescript:query')") |
| | | @GetMapping(value = "/{DetailID}") |
| | | public AjaxResult getInfo(@PathVariable("DetailID") String DetailID) |
| | | { |
| | | return success(ivrLibaExtemplatescriptService.selectIvrLibaExtemplatescriptByDetailID(DetailID)); |
| | | @ApiOperation("获取通用模板话术详细信息") |
| | | @PreAuthorize("@ss.hasPermi('smartor:extemplatescript:query')") |
| | | @GetMapping(value = "/getInfo/{ID}") |
| | | public AjaxResult getInfo(@PathVariable("ID") String ID) { |
| | | return success(ivrLibaExtemplatescriptService.selectIvrLibaExtemplatescriptByID(ID)); |
| | | } |
| | | |
| | | /** |
| | | * 新增扩展话术模板库话术 |
| | | * 新增通用模板话术 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplatescript:add')") |
| | | @Log(title = "扩展话术模板库话术", businessType = BusinessType.INSERT) |
| | | @ApiOperation("新增通用模板话术") |
| | | @PreAuthorize("@ss.hasPermi('smartor:extemplatescript:add')") |
| | | @Log(title = "通用模板话术", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody IvrLibaExtemplatescript ivrLibaExtemplatescript) |
| | | { |
| | | public AjaxResult add(@RequestBody IvrLibaExtemplatescript ivrLibaExtemplatescript) { |
| | | return toAjax(ivrLibaExtemplatescriptService.insertIvrLibaExtemplatescript(ivrLibaExtemplatescript)); |
| | | } |
| | | |
| | | /** |
| | | * 修改扩展话术模板库话术 |
| | | * 修改通用模板话术 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplatescript:edit')") |
| | | @Log(title = "扩展话术模板库话术", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("修改通用模板话术") |
| | | @PreAuthorize("@ss.hasPermi('smartor:extemplatescript:edit')") |
| | | @Log(title = "通用模板话术", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody IvrLibaExtemplatescript ivrLibaExtemplatescript) |
| | | { |
| | | public AjaxResult edit(@RequestBody IvrLibaExtemplatescript ivrLibaExtemplatescript) { |
| | | return toAjax(ivrLibaExtemplatescriptService.updateIvrLibaExtemplatescript(ivrLibaExtemplatescript)); |
| | | } |
| | | |
| | | /** |
| | | * 删除扩展话术模板库话术 |
| | | * 删除通用模板话术 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplatescript:remove')") |
| | | @Log(title = "扩展话术模板库话术", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{DetailIDs}") |
| | | public AjaxResult remove(@PathVariable String[] DetailIDs) |
| | | { |
| | | return toAjax(ivrLibaExtemplatescriptService.deleteIvrLibaExtemplatescriptByDetailIDs(DetailIDs)); |
| | | @ApiOperation("删除通用模板话术") |
| | | @PreAuthorize("@ss.hasPermi('smartor:extemplatescript:remove')") |
| | | @Log(title = "通用模板话术", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{IDs}") |
| | | public AjaxResult remove(@PathVariable String[] IDs) { |
| | | return toAjax(ivrLibaExtemplatescriptService.deleteIvrLibaExtemplatescriptByIDs(IDs)); |
| | | } |
| | | } |