| | |
| | | @Autowired |
| | | private ITTestService testService; |
| | | |
| | | @PreAuthorize("@ss.hasAnyPermi('system:test:add,system:test:edit')") |
| | | @GetMapping("/options") |
| | | public AjaxResult options() |
| | | { |
| | | return success(testService.selectConfigurationOptions()); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:test:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(TTest test) |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody TTest test) |
| | | { |
| | | test.setOperatorId(getUserId()); |
| | | test.setCreatorId(getUserId()); |
| | | test.setCreateBy(getUsername()); |
| | | return toAjax(testService.insertTest(test)); |
| | | return success(testService.createTest(test)); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:test:edit')") |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody TTest test) |
| | | { |
| | | test.setOperatorId(getUserId()); |
| | | test.setUpdateBy(getUsername()); |
| | | return toAjax(testService.updateTest(test)); |
| | | } |