| | |
| | | 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; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/ivrscenecategory") |
| | | public class IvrScenecategoryController extends BaseController |
| | | { |
| | | public class IvrScenecategoryController extends BaseController { |
| | | @Autowired |
| | | private IIvrScenecategoryService ivrScenecategoryService; |
| | | |
| | |
| | | * 查询AI服务场景管理分类列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(IvrScenecategory ivrScenecategory) |
| | | { |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrScenecategory ivrScenecategory) { |
| | | startPage(); |
| | | List<IvrScenecategory> list = ivrScenecategoryService.selectIvrScenecategoryList(ivrScenecategory); |
| | | return getDataTable(list); |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:export')") |
| | | @Log(title = "AI服务场景管理分类", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrScenecategory ivrScenecategory) |
| | | { |
| | | public void export(HttpServletResponse response, IvrScenecategory ivrScenecategory) { |
| | | List<IvrScenecategory> list = ivrScenecategoryService.selectIvrScenecategoryList(ivrScenecategory); |
| | | ExcelUtil<IvrScenecategory> util = new ExcelUtil<IvrScenecategory>(IvrScenecategory.class); |
| | | util.exportExcel(response, list, "AI服务场景管理分类数据"); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:query')") |
| | | @GetMapping(value = "/{scenecatid}") |
| | | public AjaxResult getInfo(@PathVariable("scenecatid") Long scenecatid) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("scenecatid") Long scenecatid) { |
| | | return success(ivrScenecategoryService.selectIvrScenecategoryByScenecatid(scenecatid)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:add')") |
| | | @Log(title = "AI服务场景管理分类", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody IvrScenecategory ivrScenecategory) |
| | | { |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody IvrScenecategory ivrScenecategory) { |
| | | return toAjax(ivrScenecategoryService.insertIvrScenecategory(ivrScenecategory)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:edit')") |
| | | @Log(title = "AI服务场景管理分类", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody IvrScenecategory ivrScenecategory) |
| | | { |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody IvrScenecategory ivrScenecategory) { |
| | | return toAjax(ivrScenecategoryService.updateIvrScenecategory(ivrScenecategory)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:remove')") |
| | | @Log(title = "AI服务场景管理分类", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{scenecatids}") |
| | | public AjaxResult remove(@PathVariable Long[] scenecatids) |
| | | { |
| | | @GetMapping("/remove/{scenecatids}") |
| | | public AjaxResult remove(@PathVariable Long[] scenecatids) { |
| | | return toAjax(ivrScenecategoryService.deleteIvrScenecategoryByScenecatids(scenecatids)); |
| | | } |
| | | } |