删除几个Controller和代码生成模板中冗余的三元表达式。

Signed-off-by: scmiot <scmiot@qq.com>
This commit is contained in:
scmiot
2022-10-29 08:23:09 +00:00
committed by Gitee
parent ec076c1e0d
commit 9f2dc5c233
6 changed files with 15 additions and 15 deletions

View File

@ -78,7 +78,7 @@ public class TestTreeController extends BaseController {
@RepeatSubmit
@PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody TestTreeBo bo) {
return toAjax(iTestTreeService.insertByBo(bo) ? 1 : 0);
return toAjax(iTestTreeService.insertByBo(bo));
}
/**
@ -89,7 +89,7 @@ public class TestTreeController extends BaseController {
@RepeatSubmit
@PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestTreeBo bo) {
return toAjax(iTestTreeService.updateByBo(bo) ? 1 : 0);
return toAjax(iTestTreeService.updateByBo(bo));
}
/**
@ -102,6 +102,6 @@ public class TestTreeController extends BaseController {
@DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) {
return toAjax(iTestTreeService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
return toAjax(iTestTreeService.deleteWithValidByIds(Arrays.asList(ids), true));
}
}