| | |
| | | private long defaultParentId = 0L; |
| | | |
| | | /** |
| | | * @Description 获取分类树 |
| | | * @Description 获取分类树 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/10/30 |
| | | */ |
| | | @GetMapping("/select/tree") |
| | | public ResponseValue tree(String categoryName) { |
| | | List<ProjectTreeResult> tree = this.baseCategoryService.tree(categoryName); |
| | | List<ProjectTreeResult> tree = this.baseCategoryService.tree(); |
| | | return ResponseValue.success(tree); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | int result = this.baseCategoryService.add(param, this.getCurrentUser()); |
| | | if (result > 0) return ResponseValue.success(1); |
| | | if (result > 0) { |
| | | return ResponseValue.success(1); |
| | | } |
| | | return ResponseValue.error("新增失败!"); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * |
| | | * @author 卢庆阳 |
| | | * @date 2023/10/23 |
| | | */ |
| | |
| | | if (baseCategory.getId() == null) { |
| | | return ResponseValue.error("分类id为空"); |
| | | } |
| | | int num = this.baseCategoryService.updateById(baseCategory,this.getCurrentUser()); |
| | | int num = this.baseCategoryService.updateById(baseCategory, this.getCurrentUser()); |
| | | |
| | | return num > 0 ? ResponseValue.success(1) : ResponseValue.error("删除失败!"); |
| | | } |
| | | |
| | | /** |
| | | * 根据物品id查询节点详情 |
| | | * |
| | | * @author 卢庆阳 |
| | | * @Date 2023/10/23 |
| | | */ |
| | |
| | | return ResponseValue.error("分类id为空"); |
| | | } |
| | | BaseCategory baseCategory = this.baseCategoryService.getById(id); |
| | | if (baseCategory == null) return ResponseValue.error("查询失败!"); |
| | | if (baseCategory == null) { |
| | | return ResponseValue.error("查询失败!"); |
| | | } |
| | | return ResponseValue.success("查询成功!", baseCategory); |
| | | } |
| | | |