| | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | |
| | | /** |
| | | * AI外呼话术Controller |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/ivrscript") |
| | | public class IvrSceneScriptController extends BaseController |
| | | { |
| | | public class IvrSceneScriptController extends BaseController { |
| | | @Autowired |
| | | private IIvrSceneScriptService ivrSceneScriptService; |
| | | |
| | |
| | | * 查询AI外呼话术列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscript:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrSceneScript ivrSceneScript) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody IvrSceneScript ivrSceneScript) { |
| | | startPage(); |
| | | List<IvrSceneScript> list = ivrSceneScriptService.selectIvrSceneScriptList(ivrSceneScript); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscript:export')") |
| | | @Log(title = "AI外呼话术", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrSceneScript ivrSceneScript) |
| | | { |
| | | public void export(HttpServletResponse response, IvrSceneScript ivrSceneScript) { |
| | | List<IvrSceneScript> list = ivrSceneScriptService.selectIvrSceneScriptList(ivrSceneScript); |
| | | ExcelUtil<IvrSceneScript> util = new ExcelUtil<IvrSceneScript>(IvrSceneScript.class); |
| | | util.exportExcel(response, list, "AI外呼话术数据"); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscript:query')") |
| | | @GetMapping(value = "/{scenescrid}") |
| | | public AjaxResult getInfo(@PathVariable("scenescrid") Long scenescrid) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("scenescrid") Long scenescrid) { |
| | | return success(ivrSceneScriptService.selectIvrSceneScriptByScenescrid(scenescrid)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscript:add')") |
| | | @Log(title = "AI外呼话术", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody IvrSceneScript ivrSceneScript) |
| | | { |
| | | public AjaxResult add(@RequestBody IvrSceneScript ivrSceneScript) { |
| | | return toAjax(ivrSceneScriptService.insertIvrSceneScript(ivrSceneScript)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscript:edit')") |
| | | @Log(title = "AI外呼话术", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody IvrSceneScript ivrSceneScript) |
| | | { |
| | | public AjaxResult edit(@RequestBody IvrSceneScript ivrSceneScript) { |
| | | return toAjax(ivrSceneScriptService.updateIvrSceneScript(ivrSceneScript)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscript:remove')") |
| | | @Log(title = "AI外呼话术", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{scenescrids}") |
| | | public AjaxResult remove(@PathVariable Long[] scenescrids) |
| | | { |
| | | @GetMapping("/remove/{scenescrids}") |
| | | public AjaxResult remove(@PathVariable Long[] scenescrids) { |
| | | return toAjax(ivrSceneScriptService.deleteIvrSceneScriptByScenescrids(scenescrids)); |
| | | } |
| | | } |