| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | @Api(description = "模版问题话术库") |
| | | @RestController |
| | | @RequestMapping("/smartor/templatescript") |
| | | public class IvrLibaTemplateScriptController extends BaseController |
| | | { |
| | | public class IvrLibaTemplateScriptController extends BaseController { |
| | | @Autowired |
| | | private IIvrLibaTemplateScriptService ivrLibaTemplateScriptService; |
| | | |
| | |
| | | */ |
| | | @ApiOperation("查询模版问题话术库列表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:script:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrLibaTemplateScript ivrLibaTemplateScript) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody IvrLibaTemplateScript ivrLibaTemplateScript) { |
| | | startPage(); |
| | | List<IvrLibaTemplateScript> list = ivrLibaTemplateScriptService.selectIvrLibaTemplateScriptList(ivrLibaTemplateScript); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:script:export')") |
| | | @Log(title = "模版问题话术库", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrLibaTemplateScript ivrLibaTemplateScript) |
| | | { |
| | | public void export(HttpServletResponse response, IvrLibaTemplateScript ivrLibaTemplateScript) { |
| | | List<IvrLibaTemplateScript> list = ivrLibaTemplateScriptService.selectIvrLibaTemplateScriptList(ivrLibaTemplateScript); |
| | | ExcelUtil<IvrLibaTemplateScript> util = new ExcelUtil<IvrLibaTemplateScript>(IvrLibaTemplateScript.class); |
| | | util.exportExcel(response, list, "模版问题话术库数据"); |
| | |
| | | @ApiOperation("获取模版问题话术库详细信息") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:script:query')") |
| | | @GetMapping(value = "/getInfo/{ID}") |
| | | public AjaxResult getInfo(@PathVariable("ID") Long ID) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("ID") Long ID) { |
| | | return success(ivrLibaTemplateScriptService.selectIvrLibaTemplateScriptByID(ID)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("新增模版问题话术库") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:script:add')") |
| | | @Log(title = "模版问题话术库", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody IvrLibaTemplateScript ivrLibaTemplateScript) |
| | | { |
| | | public AjaxResult add(@RequestBody IvrLibaTemplateScript ivrLibaTemplateScript) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | ivrLibaTemplateScript.setOrgid(user.getOrgid()); |
| | | return toAjax(ivrLibaTemplateScriptService.insertIvrLibaTemplateScript(ivrLibaTemplateScript)); |
| | |
| | | @ApiOperation("修改模版问题话术库") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:script:edit')") |
| | | @Log(title = "模版问题话术库", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody IvrLibaTemplateScript ivrLibaTemplateScript) |
| | | { |
| | | public AjaxResult edit(@RequestBody IvrLibaTemplateScript ivrLibaTemplateScript) { |
| | | return toAjax(ivrLibaTemplateScriptService.updateIvrLibaTemplateScript(ivrLibaTemplateScript)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("删除模版问题话术库") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:script:remove')") |
| | | @Log(title = "模版问题话术库", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{IDs}") |
| | | public AjaxResult remove(@PathVariable Long[] IDs) |
| | | { |
| | | @GetMapping("/remove/{IDs}") |
| | | public AjaxResult remove(@PathVariable Long[] IDs) { |
| | | return toAjax(ivrLibaTemplateScriptService.deleteIvrLibaTemplateScriptByIDs(IDs)); |
| | | } |
| | | } |