package com.gkhy.assess.admin.controller.web; import com.gkhy.assess.common.annotation.RepeatSubmit; import com.gkhy.assess.common.api.CommonResult; import com.gkhy.assess.system.domain.SysExpertClassify; import com.gkhy.assess.system.service.SysExpertClassifyService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @Api(tags = "专家库-专家分类前端控制器") @RestController @RequestMapping("/system/expert_classify") public class ExpertClassifyController { @Autowired private SysExpertClassifyService expertClassifyService; @ApiOperation(value = "专家分类列表(树形)") @GetMapping("/tree") public CommonResult classifyTree(SysExpertClassify expertClassify){ return CommonResult.success(expertClassifyService.classifyTree(expertClassify)); } @RequiresPermissions("system:assess:monitor") @RepeatSubmit @ApiOperation(value = "修改专家分类") @PutMapping("/mod") public CommonResult modClassify(@RequestBody SysExpertClassify expertClassify){ return CommonResult.success(expertClassifyService.modClassify(expertClassify)); } @RequiresPermissions("system:assess:monitor") @RepeatSubmit @ApiOperation(value = "删除专家分类") @DeleteMapping("/del/{classifyId}") public CommonResult delClassify(@PathVariable(value = "classifyId") Long classifyId){ return CommonResult.success(expertClassifyService.delClassify(classifyId)); } @RequiresPermissions("system:assess:monitor") @RepeatSubmit @ApiOperation(value = "新增专家分类") @PostMapping("/add") public CommonResult addClassify(@RequestBody SysExpertClassify expertClassify){ return CommonResult.success(expertClassifyService.addClassify(expertClassify)); } }