| | |
| | | return success(BeanUtils.toBean(page, MmItemTypeRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/info/{id}") |
| | | @GetMapping("/get/{id}") |
| | | public CommonResult<MmResultTableEntity> info(@PathVariable("id") String id){ |
| | | MmResultTableEntity resultTable = mmResultTableService.selectById(id); |
| | | |
| | |
| | | /** |
| | | * 保存结果存放 |
| | | */ |
| | | @PostMapping |
| | | @PostMapping("/create") |
| | | public CommonResult<Boolean> save(@RequestBody MmResultTableEntity resultTable){ |
| | | int count = mmResultTableService.check(resultTable); |
| | | if (count > 0) { |
| | |
| | | /** |
| | | * 修改结果存放 |
| | | */ |
| | | @PutMapping |
| | | @PutMapping("/update") |
| | | public CommonResult<Boolean> update(@RequestBody MmResultTableEntity resultTable){ |
| | | int count = mmResultTableService.check(resultTable); |
| | | if (count > 0) { |
| | |
| | | /** |
| | | * 删除结果存放 |
| | | */ |
| | | @DeleteMapping("{id}") |
| | | public CommonResult<Boolean> delete(@RequestBody String[] ids){ |
| | | mmResultTableService.deleteBatch(ids); |
| | | @DeleteMapping("/delete") |
| | | public CommonResult<Boolean> delete(@RequestParam("id") String id) { |
| | | mmResultTableService.deleteBatch(new String[]{id}); |
| | | return success(true); |
| | | } |
| | | } |