| | |
| | | import com.ruoyi.demo.service.ITestTreeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @ApiOperation("获取测试树表详细信息") |
| | | @PreAuthorize("@ss.hasPermi('demo:tree:query')") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<TestTreeVo> getInfo(@NotNull(message = "主键不能为空") |
| | | public AjaxResult<TestTreeVo> getInfo(@ApiParam("测试树ID") |
| | | @NotNull(message = "主键不能为空") |
| | | @PathVariable("id") Long id) { |
| | | return AjaxResult.success(iTestTreeService.queryById(id)); |
| | | } |
| | |
| | | @PreAuthorize("@ss.hasPermi('demo:tree:remove')") |
| | | @Log(title = "测试树表" , businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空") |
| | | public AjaxResult<Void> remove(@ApiParam("测试树ID串") |
| | | @NotEmpty(message = "主键不能为空") |
| | | @PathVariable Long[] ids) { |
| | | return toAjax(iTestTreeService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); |
| | | } |