From cb49dac543bedaa42503e343356841293f6b13de Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 11 九月 2024 17:26:06 +0800 Subject: [PATCH] 指标分类 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/impl/IndItemCategoryServiceImpl.java | 6 ++++++ iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/IndItemCategoryService.java | 2 ++ iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java | 13 +++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java index 072dbcf..b6b815c 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/controller/admin/IndItemCategoryController.java @@ -28,7 +28,7 @@ */ @Tag(name = "数据平台 - 指标分类") @RestController -@RequestMapping("/data/ind-item-category") +@RequestMapping("/data/ind/category") @Validated public class IndItemCategoryController { @@ -40,6 +40,15 @@ @PreAuthorize("@ss.hasPermission('data:ind-item-category:query')") public CommonResult<List<IndItemCategoryRespVO>> getList(IndItemCategoryReqVO reqVO) { List<IndItemCategoryEntity> list = indItemCategoryService.getList(reqVO); + list.sort(Comparator.comparing(IndItemCategoryEntity::getSort)); + return success(BeanUtils.toBean(list, IndItemCategoryRespVO.class)); + } + + @GetMapping("/list-all-simple") + @Operation(summary = "获取指标分类列表", description = "用于【指标分类】界面") + @PreAuthorize("@ss.hasPermission('data:ind-item-category:query')") + public CommonResult<List<IndItemCategoryRespVO>> getList() { + List<IndItemCategoryEntity> list = indItemCategoryService.getSimpleList(); list.sort(Comparator.comparing(IndItemCategoryEntity::getSort)); return success(BeanUtils.toBean(list, IndItemCategoryRespVO.class)); } @@ -71,7 +80,7 @@ @GetMapping("/get") @Operation(summary = "获取指标分类信息") - @PreAuthorize("@ss.hasPermission('system:ind-item-category:query')") + @PreAuthorize("@ss.hasPermission('data:ind-item-category:query')") public CommonResult<IndItemCategoryRespVO> get(String id) { IndItemCategoryEntity entity = indItemCategoryService.get(id); return success(BeanUtils.toBean(entity, IndItemCategoryRespVO.class)); diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/IndItemCategoryService.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/IndItemCategoryService.java index 3681c93..66db49f 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/IndItemCategoryService.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/IndItemCategoryService.java @@ -16,6 +16,8 @@ List<IndItemCategoryEntity> getList(IndItemCategoryReqVO reqVO); + List<IndItemCategoryEntity> getSimpleList(); + void create(IndItemCategorySaveReqVO createReqVO); void update(IndItemCategorySaveReqVO updateReqVO); diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/impl/IndItemCategoryServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/impl/IndItemCategoryServiceImpl.java index 5fd1947..29830d4 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/impl/IndItemCategoryServiceImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/ind/category/service/impl/IndItemCategoryServiceImpl.java @@ -1,6 +1,7 @@ package com.iailab.module.data.ind.category.service.impl; import com.iailab.framework.common.util.object.BeanUtils; +import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; import com.iailab.module.data.ind.category.entity.IndItemCategoryEntity; import com.iailab.module.data.ind.category.service.IndItemCategoryService; import com.iailab.module.data.ind.category.vo.IndItemCategoryReqVO; @@ -37,6 +38,11 @@ } @Override + public List<IndItemCategoryEntity> getSimpleList() { + return indItemCategoryDao.selectList(new LambdaQueryWrapperX<IndItemCategoryEntity>()); + } + + @Override public void create(IndItemCategorySaveReqVO createReqVO) { // 校验父菜单存在 validateParentMenu(createReqVO.getPid(), null); -- Gitblit v1.9.3