liusheng
2024-06-12 6d51501ca93f5bf46759f851988650477cf32e6c
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibScriptCategoryController.java
ÎļþÃû´Ó ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicCategoryController.java ÐÞ¸Ä
@@ -6,9 +6,9 @@
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.smartor.domain.SvyLibTopicCategory;
import com.smartor.domain.SvyLibTopicCategoryVO;
import com.smartor.service.ISvyLibTopicCategoryService;
import com.smartor.domain.SvyLibScriptCategory;
import com.smartor.domain.SvyLibScriptCategoryVO;
import com.smartor.service.ISvyLibScriptCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -26,10 +26,10 @@
 */
@Api(description = "问卷题库分类")
@RestController
@RequestMapping("/smartor/svyLibTopicCategory")
public class SvyLibTopicCategoryController extends BaseController {
@RequestMapping("/smartor/svyLibScriptCategory")
public class SvyLibScriptCategoryController extends BaseController {
    @Autowired
    private ISvyLibTopicCategoryService svyLibTopicCategoryService;
    private ISvyLibScriptCategoryService svyLibScriptCategoryService;
    /**
     * æŸ¥è¯¢é—®å·é¢˜ç›®åˆ†ç±»åˆ—表
@@ -37,9 +37,9 @@
    @ApiOperation("查询问卷题目分类列表")
    @PreAuthorize("@ss.hasPermi('smartor:category:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody SvyLibTopicCategory svyLibTopicCategory) {
    public TableDataInfo list(@RequestBody SvyLibScriptCategory svyLibScriptCategory) {
        startPage();
        List<SvyLibTopicCategoryVO> list = svyLibTopicCategoryService.selectSvyLibTopicCategoryList(svyLibTopicCategory);
        List<SvyLibScriptCategoryVO> list = svyLibScriptCategoryService.selectSvyLibScriptCategoryList(svyLibScriptCategory);
        return getDataTable(list);
    }
@@ -49,9 +49,9 @@
    @PreAuthorize("@ss.hasPermi('smartor:category:export')")
    @Log(title = "问卷题目分类", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, SvyLibTopicCategory svyLibTopicCategory) {
        List<SvyLibTopicCategoryVO> list = svyLibTopicCategoryService.selectSvyLibTopicCategoryList(svyLibTopicCategory);
        ExcelUtil<SvyLibTopicCategoryVO> util = new ExcelUtil<SvyLibTopicCategoryVO>(SvyLibTopicCategoryVO.class);
    public void export(HttpServletResponse response, SvyLibScriptCategory svyLibScriptCategory) {
        List<SvyLibScriptCategoryVO> list = svyLibScriptCategoryService.selectSvyLibScriptCategoryList(svyLibScriptCategory);
        ExcelUtil<SvyLibScriptCategoryVO> util = new ExcelUtil<SvyLibScriptCategoryVO>(SvyLibScriptCategoryVO.class);
        util.exportExcel(response, list, "问卷题目分类数据");
    }
@@ -62,7 +62,7 @@
    @PreAuthorize("@ss.hasPermi('smartor:category:query')")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(svyLibTopicCategoryService.selectSvyLibTopicCategoryById(id));
        return success(svyLibScriptCategoryService.selectSvyLibScriptCategoryById(id));
    }
//    /**
@@ -71,8 +71,8 @@
//    @PreAuthorize("@ss.hasPermi('smartor:category:add')")
//    @Log(title = "问卷题目分类", businessType = BusinessType.INSERT)
//    @PostMapping("/add")
//    public AjaxResult add(@RequestBody SvyLibTopicCategory svyLibTopicCategory) {
//        return toAjax(svyLibTopicCategoryService.insertSvyLibTopicCategory(svyLibTopicCategory));
//    public AjaxResult add(@RequestBody SvyLibScriptCategory svyLibScriptCategory) {
//        return toAjax(svyLibScriptCategoryService.insertSvyLibScriptCategory(svyLibScriptCategory));
//    }
    /**
@@ -81,8 +81,8 @@
    @PreAuthorize("@ss.hasPermi('smartor:category:edit')")
    @Log(title = "问卷题目分类", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody SvyLibTopicCategory svyLibTopicCategory) {
        return toAjax(svyLibTopicCategoryService.updateSvyLibTopicCategory(svyLibTopicCategory));
    public AjaxResult edit(@RequestBody SvyLibScriptCategory svyLibScriptCategory) {
        return toAjax(svyLibScriptCategoryService.updateSvyLibScriptCategory(svyLibScriptCategory));
    }
    /**
@@ -93,7 +93,7 @@
    @Log(title = "问卷题目分类", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(svyLibTopicCategoryService.deleteSvyLibTopicCategoryByIds(ids));
        return toAjax(svyLibScriptCategoryService.deleteSvyLibScriptCategoryByIds(ids));
    }
    /**
@@ -103,7 +103,7 @@
    @Log(title = "问卷题目分类树", businessType = BusinessType.INSERT)
    @ApiOperation("问卷题目分类树")
    @PostMapping("/addtree")
    public AjaxResult addtree(@RequestBody SvyLibTopicCategoryVO svyLibTopicCategoryVO) {
        return toAjax(svyLibTopicCategoryService.insertSvyLibTopicCategoryTree(svyLibTopicCategoryVO));
    public AjaxResult addtree(@RequestBody SvyLibScriptCategoryVO svyLibScriptCategoryVO) {
        return toAjax(svyLibScriptCategoryService.insertSvyLibScriptCategoryTree(svyLibScriptCategoryVO));
    }
}