| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | @RepeatSubmit |
| | | @PostMapping() |
| | | public R<Void> add(@Validated(AddGroup.class) @RequestBody TestTreeBo bo) { |
| | | return toAjax(iTestTreeService.insertByBo(bo) ? 1 : 0); |
| | | return toAjax(iTestTreeService.insertByBo(bo)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @RepeatSubmit |
| | | @PutMapping() |
| | | public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestTreeBo bo) { |
| | | return toAjax(iTestTreeService.updateByBo(bo) ? 1 : 0); |
| | | return toAjax(iTestTreeService.updateByBo(bo)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @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)); |
| | | } |
| | | } |