Commit 1956a3ec by guojuxing

登录数据处理调整

parent 97199d8d
...@@ -158,10 +158,10 @@ public interface MenuApiService { ...@@ -158,10 +158,10 @@ public interface MenuApiService {
* @Title: getSuperAdminGicMenuNotTree
 * @Title: getSuperAdminGicMenuNotTree

* @Description: * @Description:

 * @author guojuxing 
 * @author guojuxing
* @param enterpriseId * @param versionCode
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.MenuDTO>>
 * @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.MenuDTO>>


 */ 
 */
ServiceResponse<List<MenuDTO>> getSuperAdminMenuNotTree(Integer enterpriseId); ServiceResponse<List<MenuDTO>> getAllMenuNotTree(String versionCode);
/** /**
* 查询gic菜单页面树数据 * 查询gic菜单页面树数据
......
...@@ -139,7 +139,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -139,7 +139,7 @@ public class MenuApiServiceImpl implements MenuApiService {
params.setMenuType(MenuTypeEnum.PAGE.getCode()); params.setMenuType(MenuTypeEnum.PAGE.getCode());
temp.addAll(this.menuService.listMenu(params)); temp.addAll(this.menuService.listMenu(params));
result = EntityUtil.changeEntityListNew(MenuDTO.class, temp); result = EntityUtil.changeEntityListNew(MenuDTO.class, filterOperationUserDepartAuth(temp, tabSysUser));
} else { } else {
List<TabSysMenu> menuList = getUserMenuList(userId); List<TabSysMenu> menuList = getUserMenuList(userId);
result = EntityUtil.changeEntityListNew(MenuDTO.class, menuList); result = EntityUtil.changeEntityListNew(MenuDTO.class, menuList);
...@@ -231,14 +231,21 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -231,14 +231,21 @@ public class MenuApiServiceImpl implements MenuApiService {
} }
@Override @Override
public ServiceResponse<List<MenuDTO>> getSuperAdminMenuNotTree(Integer enterpriseId) { public ServiceResponse<List<MenuDTO>> getAllMenuNotTree(String versionCode) {
//查询超级管理员 List<TabSysMenu> temp = new ArrayList<>();
TabSysUser tabSysUser = userService.getUserByEnterpriseId(enterpriseId); //超级管理员
if (tabSysUser == null) { MenuListQO params = new MenuListQO();
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "没有超级管理员,数据错误"); //查询gic的菜单
} params.setIsGIC(MenuProjectConstants.DEFAULT_PROJECT_CODE);
String versionCode = enterpriseApiService.getEnterpriseById(enterpriseId).getResult().getVersionCode(); params.setVersionCode(versionCode);
return listUserMenu(tabSysUser.getUserId(), versionCode); params.setMenuType(MenuTypeEnum.PAGE.getCode());
temp.addAll(this.menuService.listMenu(params));
//查询应用的菜单
params.setVersionCode("");
params.setIsGIC(MenuProjectConstants.APP_PROJECT_CODE);
params.setMenuType(MenuTypeEnum.PAGE.getCode());
temp.addAll(this.menuService.listMenu(params));
return ServiceResponse.success(EntityUtil.changeEntityListNew(MenuDTO.class, temp));
} }
@Override @Override
......
...@@ -156,7 +156,7 @@ public class LoginController { ...@@ -156,7 +156,7 @@ public class LoginController {
//查询全部的操作模块 //查询全部的操作模块
Map<String, MenuInfo> moduleMap = new HashMap<>(16); Map<String, MenuInfo> moduleMap = new HashMap<>(16);
ServiceResponse<List<MenuDTO>> allGicMenu = menuApiService ServiceResponse<List<MenuDTO>> allGicMenu = menuApiService
.getSuperAdminMenuNotTree(enterpriseId); .getAllMenuNotTree(enterpriseDTO.getVersionCode());
if (allGicMenu.isSuccess()) { if (allGicMenu.isSuccess()) {
List<MenuDTO> temp = allGicMenu.getResult(); List<MenuDTO> temp = allGicMenu.getResult();
List<MenuInfo> tempMenuInfoList = EntityUtil.changeEntityListNew(MenuInfo.class, temp); List<MenuInfo> tempMenuInfoList = EntityUtil.changeEntityListNew(MenuInfo.class, temp);
......
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