| | |
| | | package com.ruoyi.demo.controller; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | * 查询测试树表列表 |
| | | */ |
| | | @ApiOperation("查询测试树表列表") |
| | | @PreAuthorize("@ss.hasPermi('demo:tree:list')") |
| | | @SaCheckPermission("demo:tree:list") |
| | | @GetMapping("/list") |
| | | public AjaxResult<List<TestTreeVo>> list(@Validated(QueryGroup.class) TestTreeBo bo) { |
| | | List<TestTreeVo> list = iTestTreeService.queryList(bo); |
| | |
| | | * 导出测试树表列表 |
| | | */ |
| | | @ApiOperation("导出测试树表列表") |
| | | @PreAuthorize("@ss.hasPermi('demo:tree:export')") |
| | | @SaCheckPermission("demo:tree:export") |
| | | @Log(title = "测试树表", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public void export(@Validated TestTreeBo bo, HttpServletResponse response) { |
| | |
| | | * 获取测试树表详细信息 |
| | | */ |
| | | @ApiOperation("获取测试树表详细信息") |
| | | @PreAuthorize("@ss.hasPermi('demo:tree:query')") |
| | | @SaCheckPermission("demo:tree:query") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<TestTreeVo> getInfo(@ApiParam("测试树ID") |
| | | @NotNull(message = "主键不能为空") |
| | |
| | | * 新增测试树表 |
| | | */ |
| | | @ApiOperation("新增测试树表") |
| | | @PreAuthorize("@ss.hasPermi('demo:tree:add')") |
| | | @SaCheckPermission("demo:tree:add") |
| | | @Log(title = "测试树表", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit |
| | | @PostMapping() |
| | |
| | | * 修改测试树表 |
| | | */ |
| | | @ApiOperation("修改测试树表") |
| | | @PreAuthorize("@ss.hasPermi('demo:tree:edit')") |
| | | @SaCheckPermission("demo:tree:edit") |
| | | @Log(title = "测试树表", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit |
| | | @PutMapping() |
| | |
| | | * 删除测试树表 |
| | | */ |
| | | @ApiOperation("删除测试树表") |
| | | @PreAuthorize("@ss.hasPermi('demo:tree:remove')") |
| | | @Log(title = "测试树表", businessType = BusinessType.DELETE) |
| | | @SaCheckPermission("demo:tree:remove") |
| | | @Log(title = "测试树表" , businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult<Void> remove(@ApiParam("测试树ID串") |
| | | @NotEmpty(message = "主键不能为空") |