疯狂的狮子li
2022-07-07 0b077806196ceb8a68af93f00880ccc70aee50c2
ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java
@@ -13,9 +13,9 @@
import com.ruoyi.demo.domain.bo.TestTreeBo;
import com.ruoyi.demo.domain.vo.TestTreeVo;
import com.ruoyi.demo.service.ITestTreeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -33,7 +33,7 @@
 * @date 2021-07-26
 */
@Validated
@Api(value = "测试树表控制器", tags = {"测试树表管理"})
@Tag(name ="测试树表控制器", description = "测试树表管理")
@RequiredArgsConstructor
@RestController
@RequestMapping("/demo/tree")
@@ -44,7 +44,7 @@
    /**
     * 查询测试树表列表
     */
    @ApiOperation("查询测试树表列表")
    @Operation(summary = "查询测试树表列表")
    @SaCheckPermission("demo:tree:list")
    @GetMapping("/list")
    public R<List<TestTreeVo>> list(@Validated(QueryGroup.class) TestTreeBo bo) {
@@ -55,7 +55,7 @@
    /**
     * 导出测试树表列表
     */
    @ApiOperation("导出测试树表列表")
    @Operation(summary = "导出测试树表列表")
    @SaCheckPermission("demo:tree:export")
    @Log(title = "测试树表", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
@@ -67,10 +67,10 @@
    /**
     * 获取测试树表详细信息
     */
    @ApiOperation("获取测试树表详细信息")
    @Operation(summary = "获取测试树表详细信息")
    @SaCheckPermission("demo:tree:query")
    @GetMapping("/{id}")
    public R<TestTreeVo> getInfo(@ApiParam("测试树ID")
    public R<TestTreeVo> getInfo(@Parameter(name = "测试树ID")
                                          @NotNull(message = "主键不能为空")
                                          @PathVariable("id") Long id) {
        return R.ok(iTestTreeService.queryById(id));
@@ -79,7 +79,7 @@
    /**
     * 新增测试树表
     */
    @ApiOperation("新增测试树表")
    @Operation(summary = "新增测试树表")
    @SaCheckPermission("demo:tree:add")
    @Log(title = "测试树表", businessType = BusinessType.INSERT)
    @RepeatSubmit
@@ -91,7 +91,7 @@
    /**
     * 修改测试树表
     */
    @ApiOperation("修改测试树表")
    @Operation(summary = "修改测试树表")
    @SaCheckPermission("demo:tree:edit")
    @Log(title = "测试树表", businessType = BusinessType.UPDATE)
    @RepeatSubmit
@@ -103,11 +103,11 @@
    /**
     * 删除测试树表
     */
    @ApiOperation("删除测试树表")
    @Operation(summary = "删除测试树表")
    @SaCheckPermission("demo:tree:remove")
    @Log(title = "测试树表", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public R<Void> remove(@ApiParam("测试树ID串")
    public R<Void> remove(@Parameter(name = "测试树ID串")
                                   @NotEmpty(message = "主键不能为空")
                                   @PathVariable Long[] ids) {
        return toAjax(iTestTreeService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);