scmiot
2022-10-29 9f2dc5c233ad145768dca37907a829cfcb1a5483
ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java
@@ -119,7 +119,7 @@
        // 使用校验工具对标 @Validated(AddGroup.class) 注解
        // 用于在非 Controller 的地方校验对象
        ValidatorUtils.validate(bo, AddGroup.class);
        return toAjax(iTestDemoService.insertByBo(bo) ? 1 : 0);
        return toAjax(iTestDemoService.insertByBo(bo));
    }
    /**
@@ -130,7 +130,7 @@
    @RepeatSubmit
    @PutMapping()
    public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestDemoBo bo) {
        return toAjax(iTestDemoService.updateByBo(bo) ? 1 : 0);
        return toAjax(iTestDemoService.updateByBo(bo));
    }
    /**
@@ -143,6 +143,6 @@
    @DeleteMapping("/{ids}")
    public R<Void> remove(@NotEmpty(message = "主键不能为空")
                          @PathVariable Long[] ids) {
        return toAjax(iTestDemoService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
        return toAjax(iTestDemoService.deleteWithValidByIds(Arrays.asList(ids), true));
    }
}