liusheng
2024-07-06 4bd9498d45b4d9f4bc948c04ec8efc9bb02d937e
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyCategoryController.java
@@ -3,6 +3,8 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.smartor.domain.IvrLibaScriptAssortVO;
import com.smartor.domain.SvyCategoryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
@@ -36,10 +38,10 @@
     * 查询问卷分类列表
     */
    @PreAuthorize("@ss.hasPermi('smartor:svycategory:list')")
    @GetMapping("/list")
    public TableDataInfo list(SvyCategory svyCategory) {
        startPage();
        List<SvyCategory> list = svyCategoryService.selectSvyCategoryList(svyCategory);
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody SvyCategory svyCategory) {
//        startPage();
        List<SvyCategoryVO> list = svyCategoryService.selectSvyCategoryList(svyCategory);
        return getDataTable(list);
    }
@@ -50,8 +52,8 @@
    @Log(title = "问卷分类", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, SvyCategory svyCategory) {
        List<SvyCategory> list = svyCategoryService.selectSvyCategoryList(svyCategory);
        ExcelUtil<SvyCategory> util = new ExcelUtil<SvyCategory>(SvyCategory.class);
        List<SvyCategoryVO> list = svyCategoryService.selectSvyCategoryList(svyCategory);
        ExcelUtil<SvyCategoryVO> util = new ExcelUtil<SvyCategoryVO>(SvyCategoryVO.class);
        util.exportExcel(response, list, "问卷分类数据");
    }
@@ -71,9 +73,20 @@
    @PreAuthorize("@ss.hasPermi('smartor:svycategory:add')")
    @Log(title = "问卷分类", businessType = BusinessType.INSERT)
    @ApiOperation("新增问卷分类")
    @PostMapping
    @PostMapping("/add")
    public AjaxResult add(@RequestBody SvyCategory svyCategory) {
        return toAjax(svyCategoryService.insertSvyCategory(svyCategory));
    }
    /**
     * 新增问卷分类树
     */
    @PreAuthorize("@ss.hasPermi('system:assort:add')")
    @Log(title = "问题话术分类库", businessType = BusinessType.INSERT)
    @ApiOperation("新增问卷分类树")
    @PostMapping("/addtree")
    public AjaxResult addtree(@RequestBody SvyCategoryVO svyCategoryVO) {
        return toAjax(svyCategoryService.insertSvyCategoryTree(svyCategoryVO));
    }
    /**
@@ -82,7 +95,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:svycategory:edit')")
    @Log(title = "问卷分类", businessType = BusinessType.UPDATE)
    @ApiOperation("修改问卷分类")
    @PutMapping
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody SvyCategory svyCategory) {
        return toAjax(svyCategoryService.updateSvyCategory(svyCategory));
    }
@@ -93,7 +106,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:svycategory:remove')")
    @Log(title = "问卷分类", businessType = BusinessType.DELETE)
    @ApiOperation("删除问卷分类")
    @DeleteMapping("/{ids}")
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(svyCategoryService.deleteSvyCategoryByIds(ids));
    }