| | |
| | | import com.ruoyi.demo.service.ITestDemoService; |
| | | 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:demo:query')") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<TestDemoVo> getInfo(@NotNull(message = "主键不能为空") |
| | | public AjaxResult<TestDemoVo> getInfo(@ApiParam("测试ID") |
| | | @NotNull(message = "主键不能为空") |
| | | @PathVariable("id") Long id) { |
| | | return AjaxResult.success(iTestDemoService.queryById(id)); |
| | | } |
| | |
| | | @PreAuthorize("@ss.hasPermi('demo:demo: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(iTestDemoService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0); |
| | | } |