From 7cf54012c46c54bd701310cc29caaa94676ea570 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 18 三月 2024 23:04:51 +0800
Subject: [PATCH] 分类授权功能完善

---
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java |   63 +++++++++++++++++++++++++++++--
 1 files changed, 58 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..adabc56 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
@@ -16,15 +16,16 @@
  */
 package com.vci.ubcs.system.feign;
 
+import com.vci.ubcs.system.dto.ClassifyAuthDTO;
 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 +61,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 +97,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 +166,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 +259,20 @@
 		return R.data(combinationService.getRegexList(combinationIds));
 	}
 
+	@Override
+	@GetMapping(MDM_COUNT_CONFIG)
+	public R<MdmCountConfig> getMdmCountConfig (String userId) {
+		return R.data(mdmCountConfigService.getMdmCountConfig(userId));
+	}
+
+	@GetMapping(GETVIEWCLASSIFY)
+	public R<List<String>> getViewClassByRoleIds(List<String> roleIds,String authType,String buttonCode,String menuCode){
+		return R.data(classifyAuthService.getViewClassByRoleIds(roleIds,authType,buttonCode,menuCode));
+	}
+
+	@PostMapping(SAVEADDCLASSIFYDEFAULTAUTH)
+	public R saveAddClassifyDefaultAuth(@RequestBody ClassifyAuthDTO classifyAuthDTOS){
+		return classifyAuthService.saveAddClassifyDefaultAuth(classifyAuthDTOS);
+	}
 
 }

--
Gitblit v1.9.3