| | |
| | | package com.smartor.controller; |
| | | 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; |
| | |
| | | |
| | | /** |
| | | * 扩展话术模板库Controller |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-22 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/ivrextemplate") |
| | | public class IvrLibaExtemplateController extends BaseController |
| | | { |
| | | public class IvrLibaExtemplateController extends BaseController { |
| | | @Autowired |
| | | private IIvrLibaExtemplateService ivrLibaExtemplateService; |
| | | |
| | |
| | | * 查询扩展话术模板库列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplate:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(IvrLibaExtemplate ivrLibaExtemplate) |
| | | { |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrLibaExtemplate ivrLibaExtemplate) { |
| | | startPage(); |
| | | List<IvrLibaExtemplate> list = ivrLibaExtemplateService.selectIvrLibaExtemplateList(ivrLibaExtemplate); |
| | | return getDataTable(list); |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplate:export')") |
| | | @Log(title = "扩展话术模板库", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrLibaExtemplate ivrLibaExtemplate) |
| | | { |
| | | public void export(HttpServletResponse response, IvrLibaExtemplate ivrLibaExtemplate) { |
| | | List<IvrLibaExtemplate> list = ivrLibaExtemplateService.selectIvrLibaExtemplateList(ivrLibaExtemplate); |
| | | ExcelUtil<IvrLibaExtemplate> util = new ExcelUtil<IvrLibaExtemplate>(IvrLibaExtemplate.class); |
| | | util.exportExcel(response, list, "扩展话术模板库数据"); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplate:query')") |
| | | @GetMapping(value = "/{subModuleID}") |
| | | public AjaxResult getInfo(@PathVariable("subModuleID") String subModuleID) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("subModuleID") String subModuleID) { |
| | | return success(ivrLibaExtemplateService.selectIvrLibaExtemplateBySubModuleID(subModuleID)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplate:add')") |
| | | @Log(title = "扩展话术模板库", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody IvrLibaExtemplate ivrLibaExtemplate) |
| | | { |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody IvrLibaExtemplate ivrLibaExtemplate) { |
| | | return toAjax(ivrLibaExtemplateService.insertIvrLibaExtemplate(ivrLibaExtemplate)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplate:edit')") |
| | | @Log(title = "扩展话术模板库", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody IvrLibaExtemplate ivrLibaExtemplate) |
| | | { |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody IvrLibaExtemplate ivrLibaExtemplate) { |
| | | return toAjax(ivrLibaExtemplateService.updateIvrLibaExtemplate(ivrLibaExtemplate)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrextemplate:remove')") |
| | | @Log(title = "扩展话术模板库", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{subModuleIDs}") |
| | | public AjaxResult remove(@PathVariable String[] subModuleIDs) |
| | | { |
| | | @GetMapping("/remove/{subModuleIDs}") |
| | | public AjaxResult remove(@PathVariable String[] subModuleIDs) { |
| | | return toAjax(ivrLibaExtemplateService.deleteIvrLibaExtemplateBySubModuleIDs(subModuleIDs)); |
| | | } |
| | | } |