liusheng
2024-11-07 37b79cfd8e5ecdc6f9f09750583f998183c338fb
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrScenecategoryController.java
@@ -1,7 +1,8 @@
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;
@@ -23,24 +24,22 @@
/**
 * AI服务场景管理分类Controller
 *
 *
 * @author smartor
 * @date 2023-03-06
 */
@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)
    {
    //@PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody IvrScenecategory ivrScenecategory) {
        startPage();
        List<IvrScenecategory> list = ivrScenecategoryService.selectIvrScenecategoryList(ivrScenecategory);
        return getDataTable(list);
@@ -49,11 +48,10 @@
    /**
     * 导出AI服务场景管理分类列表
     */
    @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:export')")
    //@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服务场景管理分类数据");
@@ -62,43 +60,39 @@
    /**
     * 获取AI服务场景管理分类详细信息
     */
    @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:query')")
    //@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));
    }
    /**
     * 新增AI服务场景管理分类
     */
    @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:add')")
    //@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));
    }
    /**
     * 修改AI服务场景管理分类
     */
    @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:edit')")
    //@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));
    }
    /**
     * 删除AI服务场景管理分类
     */
    @PreAuthorize("@ss.hasPermi('smartor:ivrscenecategory:remove')")
    //@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));
    }
}