Commit 412322bf by guojuxing

协作人应用权限筛选

parent 2615d545
...@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse; ...@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.dto.AuthItemListDTO; import com.gic.auth.dto.AuthItemListDTO;
import com.gic.auth.dto.MenuAuthDepartDTO; import com.gic.auth.dto.MenuAuthDepartDTO;
import com.gic.auth.dto.MenuDTO; import com.gic.auth.dto.MenuDTO;
import com.gic.auth.dto.UserDTO;
import com.gic.auth.qo.AuthItemSaveQO; import com.gic.auth.qo.AuthItemSaveQO;
import com.gic.auth.qo.MenuListQO; import com.gic.auth.qo.MenuListQO;
import com.gic.auth.qo.MenuOperationItemListQO; import com.gic.auth.qo.MenuOperationItemListQO;
...@@ -415,4 +416,12 @@ public interface MenuApiService { ...@@ -415,4 +416,12 @@ public interface MenuApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
 * @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


*/ 
*/
ServiceResponse<Void> syncProductMenu(String menuCode); ServiceResponse<Void> syncProductMenu(String menuCode);
/**
* 过滤运维用户部门职位权限
* @param resultList
* @param tabSysUser
* @return
*/
ServiceResponse<List<MenuDTO>> filterOperationUserDepartAuth(List<MenuDTO> resultList, UserDTO tabSysUser);
} }
...@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl; ...@@ -3,6 +3,7 @@ package com.gic.auth.service.outer.impl;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.gic.auth.dto.UserDTO;
import com.gic.auth.entity.*; import com.gic.auth.entity.*;
import com.gic.auth.qo.UserMenuQO; import com.gic.auth.qo.UserMenuQO;
import com.gic.authcenter.api.dto.GicDepartmentDTO; import com.gic.authcenter.api.dto.GicDepartmentDTO;
...@@ -709,6 +710,13 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -709,6 +710,13 @@ public class MenuApiServiceImpl implements MenuApiService {
return ServiceResponse.success(); return ServiceResponse.success();
} }
@Override
public ServiceResponse<List<MenuDTO>> filterOperationUserDepartAuth(List<MenuDTO> resultList, UserDTO tabSysUser) {
List<TabSysMenu> list = filterOperationUserDepartAuth(EntityUtil.changeEntityListNew(TabSysMenu.class, resultList),
EntityUtil.changeEntityNew(TabSysUser.class, tabSysUser));
return ServiceResponse.success(EntityUtil.changeEntityListNew(MenuDTO.class, list));
}
private ServiceResponse<Void> savePage(MenuDTO menuDTO, Class clazz) { private ServiceResponse<Void> savePage(MenuDTO menuDTO, Class clazz) {
ServiceResponse paramsValid = ValidParamsUtils.allCheckValidate(menuDTO, clazz); ServiceResponse paramsValid = ValidParamsUtils.allCheckValidate(menuDTO, clazz);
if (!paramsValid.isSuccess()) { if (!paramsValid.isSuccess()) {
......
...@@ -152,6 +152,8 @@ public class CollaboratorController extends DownloadUtils{ ...@@ -152,6 +152,8 @@ public class CollaboratorController extends DownloadUtils{
MenuListQO params = new MenuListQO(); MenuListQO params = new MenuListQO();
params.setProject(appId); params.setProject(appId);
params.setIsGIC(MenuProjectConstants.APP_PROJECT_CODE); params.setIsGIC(MenuProjectConstants.APP_PROJECT_CODE);
//普通管理员
params.setAuthTypeList(Arrays.asList(1));
ServiceResponse<List<MenuDTO>> appMenuList = menuApiService.listMenuTree(params); ServiceResponse<List<MenuDTO>> appMenuList = menuApiService.listMenuTree(params);
if (appMenuList.isSuccess()) { if (appMenuList.isSuccess()) {
return RestResponse.success(changePageListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, appMenuList.getResult())); return RestResponse.success(changePageListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, appMenuList.getResult()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment