From 02e7ca80d849ad8a99974bd08f9e68a78f36d601 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 16 一月 2024 21:51:45 +0800 Subject: [PATCH] 分类授权数据授权界面编写与接口修改 --- Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 51 insertions(+), 5 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java index 5f1dca7..9d71dce 100644 --- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java +++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java @@ -18,13 +18,13 @@ import com.vci.ubcs.system.entity.*; import com.vci.ubcs.system.service.*; +import com.vci.ubcs.system.vo.DeptVO; +import com.vci.ubcs.system.vo.RoleVO; import lombok.AllArgsConstructor; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tenant.annotation.NonDS; import org.springblade.core.tool.api.R; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; import java.util.List; @@ -60,10 +60,31 @@ private final ICombinationService combinationService; + private final IMdmCountConfigService mdmCountConfigService; + + private final IClassifyAuthService classifyAuthService; + @Override @GetMapping(MENU) public R<Menu> getMenu(Long id) { return R.data(menuService.getById(id)); + } + + /** + * 鏍规嵁code鏌ヨ鑿滃崟淇℃伅 + * @param codes + * @return + */ + @Override + @GetMapping(MENU_BY_CODES) + public R<List<Menu>> getMenuByCodes(List<String> codes,Long userId) { + return R.data(menuService.getMenuByCodes(codes,userId)); + } + + @Override + @GetMapping(MENU_BUTTON) + public R<List<Menu>> getMenuButtonByType(String classifyId,String btmType,String authType) { + return R.data(menuService.getMenuButtonByType(classifyId,btmType,authType)); } @Override @@ -75,6 +96,15 @@ @Override public R<String> getDeptIds(String tenantId, String deptNames) { return R.data(deptService.getDeptIds(tenantId, deptNames)); + } + @Override + public R<List<DeptVO>> tree(String tenantId) { + return R.data(deptService.tree(tenantId)); + } + + @Override + public R<List<DeptVO>> deptList(String tenantId) { + return R.data(deptService.deptList(tenantId)); } @Override @@ -135,7 +165,14 @@ public R<String> getRoleIds(String tenantId, String roleNames) { return R.data(roleService.getRoleIds(tenantId, roleNames)); } - + @Override + public R<List<RoleVO>> roleTree(String tenantId) { + return R.data(roleService.tree(tenantId)); + } + @Override + public R<List<RoleVO>> roleList(String tenantId) { + return R.data(roleService.roleList(tenantId)); + } @Override @GetMapping(ROLE_NAME) public R<String> getRoleName(Long id) { @@ -221,5 +258,14 @@ return R.data(combinationService.getRegexList(combinationIds)); } + @Override + @GetMapping(MDM_COUNT_CONFIG) + public R<MdmCountConfig> getMdmCountConfig (String userId) { + return R.data(mdmCountConfigService.getMdmCountConfig(userId)); + } + + public R<List<String>> getViewClassByRoleIds(List<String> roleIds){ + return R.data(classifyAuthService.getViewClassByRoleIds(roleIds)); + } } -- Gitblit v1.9.3