| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得物料分类") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1") |
| | | @PreAuthorize("@ss.hasPermission('mdm:item-category:query')") |
| | | public CommonResult<MdmItemCategoryRespVO> getItemCategory(@RequestParam("id") Long id) { |
| | | MdmItemCategoryDO itemCategory = itemCategoryService.getItemCategory(id); |
| | | return success(BeanUtils.toBean(itemCategory, MdmItemCategoryRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得物料分类分页") |
| | | @PreAuthorize("@ss.hasPermission('mdm:item-category:query')") |
| | | public CommonResult<PageResult<MdmItemCategoryRespVO>> getItemCategoryPage(@Valid MdmItemCategoryPageReqVO pageReqVO) { |
| | | PageResult<MdmItemCategoryDO> pageResult = itemCategoryService.getItemCategoryPage(pageReqVO); |
| | | return success(BeanUtils.toBean(pageResult, MdmItemCategoryRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/list") |
| | | @Operation(summary = "获得物料分类列表") |
| | | @PreAuthorize("@ss.hasPermission('mdm:item-category:query')") |
| | | public CommonResult<List<MdmItemCategoryRespVO>> getItemCategoryList() { |
| | | List<MdmItemCategoryDO> list = itemCategoryService.getItemCategoryList(null); |
| | | return success(BeanUtils.toBean(list, MdmItemCategoryRespVO.class)); |