| | |
| | | * 预测项类型列表 |
| | | */ |
| | | @GetMapping("/page") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-item:query')") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-type:query')") |
| | | public CommonResult<PageResult<MmItemTypeRespVO>> page(@Validated MmItemTypePageReqVO reqVO) { |
| | | PageResult<MmItemTypeEntity> page = mmItemTypeService.page(reqVO); |
| | | |
| | |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-item:query')") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-type:query')") |
| | | public CommonResult<List<MmItemTypeEntity>> list(@RequestParam Map<String, Object> params) { |
| | | List<MmItemTypeEntity> list = mmItemTypeService.list(params); |
| | | |
| | |
| | | * 预测项类型信息 |
| | | */ |
| | | @GetMapping("/get/{id}") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-item:query')") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-type:query')") |
| | | public CommonResult<MmItemTypeEntity> info(@PathVariable("id") String id) { |
| | | MmItemTypeEntity itemType = mmItemTypeService.info(id); |
| | | |
| | |
| | | * 保存预测项类型 |
| | | */ |
| | | @PostMapping("/create") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-item:create')") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-type:create')") |
| | | @DSTransactional(rollbackFor= Exception.class) |
| | | public CommonResult<Boolean> save(@RequestBody MmItemTypeEntity itemType) { |
| | | int count = mmItemTypeService.check(itemType); |
| | |
| | | * 修改预测项类型 |
| | | */ |
| | | @PutMapping("/update") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-item:update')") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-type:update')") |
| | | @DSTransactional(rollbackFor= Exception.class) |
| | | public CommonResult<Boolean> update(@RequestBody MmItemTypeEntity itemType) { |
| | | int count = mmItemTypeService.check(itemType); |
| | |
| | | * 删除预测项类型 |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-item:delete')") |
| | | @PreAuthorize("@ss.hasPermission('model:pre-type:delete')") |
| | | @DSTransactional(rollbackFor= Exception.class) |
| | | public CommonResult<Boolean> delete(@RequestParam("id") String id) { |
| | | mmItemTypeService.deleteBatch(new String[]{id}); |