From bedd0a1cef215538df64470df6b8d4a022189136 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期三, 28 八月 2024 14:05:16 +0800 Subject: [PATCH] 代码提交 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyCategoryController.java | 31 ++++++++++++++++++++++--------- 1 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyCategoryController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyCategoryController.java index ccb0e4e..340cf00 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyCategoryController.java +++ b/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)); } -- Gitblit v1.9.3