Commit 669e577b by guojuxing

应用列表过滤商户基础应用修复

parent 31888f7b
...@@ -199,9 +199,11 @@ public class MenuController { ...@@ -199,9 +199,11 @@ public class MenuController {
if (result.isSuccess()) { if (result.isSuccess()) {
//过滤商户基础应用 //过滤商户基础应用
List<MenuDTO> appMenuList = result.getResult(); List<MenuDTO> appMenuList = result.getResult();
appMenuList = appMenuList.stream() if (CollectionUtils.isNotEmpty(appMenuList)) {
.filter(e -> !EnterpriseBasicAppUtils.ENTERPRISE_BASIC_APP_CODE.equals(e.getMenuCode())) appMenuList = appMenuList.stream()
.collect(Collectors.toList()); .filter(e -> !EnterpriseBasicAppUtils.ENTERPRISE_BASIC_APP_CODE.equals(e.getMenuCode()))
.collect(Collectors.toList());
}
return RestResponse return RestResponse
.success(changePageListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, appMenuList)); .success(changePageListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, appMenuList));
} }
......
...@@ -7,6 +7,7 @@ import java.util.Map; ...@@ -7,6 +7,7 @@ import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.gic.auth.web.utils.EnterpriseBasicAppUtils; import com.gic.auth.web.utils.EnterpriseBasicAppUtils;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -74,9 +75,11 @@ public class RoleController { ...@@ -74,9 +75,11 @@ public class RoleController {
.listAppPageOfHasBuy(UserDetailUtils.getUserDetail().getEnterpriseId()); .listAppPageOfHasBuy(UserDetailUtils.getUserDetail().getEnterpriseId());
//过滤商户基础应用 //过滤商户基础应用
List<MenuDTO> appMenuList = appResult.getResult(); List<MenuDTO> appMenuList = appResult.getResult();
appMenuList = appMenuList.stream() if (CollectionUtils.isNotEmpty(appMenuList)) {
.filter(e -> !EnterpriseBasicAppUtils.ENTERPRISE_BASIC_APP_CODE.equals(e.getMenuCode())) appMenuList = appMenuList.stream()
.collect(Collectors.toList()); .filter(e -> !EnterpriseBasicAppUtils.ENTERPRISE_BASIC_APP_CODE.equals(e.getMenuCode()))
.collect(Collectors.toList());
}
vo.setAppMap( vo.setAppMap(
changeListToSelectTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, appMenuList, gicMap)); changeListToSelectTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, appMenuList, gicMap));
...@@ -152,9 +155,11 @@ public class RoleController { ...@@ -152,9 +155,11 @@ public class RoleController {
.listAppPageOfHasBuy(UserDetailUtils.getUserDetail().getEnterpriseId()); .listAppPageOfHasBuy(UserDetailUtils.getUserDetail().getEnterpriseId());
if (result.isSuccess()) { if (result.isSuccess()) {
List<MenuDTO> menuList = result.getResult(); List<MenuDTO> menuList = result.getResult();
menuList = menuList.stream() if (CollectionUtils.isNotEmpty(menuList)) {
.filter(e -> !EnterpriseBasicAppUtils.ENTERPRISE_BASIC_APP_CODE.equals(e.getMenuCode())) menuList = menuList.stream()
.collect(Collectors.toList()); .filter(e -> !EnterpriseBasicAppUtils.ENTERPRISE_BASIC_APP_CODE.equals(e.getMenuCode()))
.collect(Collectors.toList());
}
return RestResponse.success(changeListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, menuList)); return RestResponse.success(changeListToTree(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, menuList));
} }
return EnterpriseRestResponse.failure(result); return EnterpriseRestResponse.failure(result);
......
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