feat: There is no way the #47611

This commit is contained in:
super_liu
2021-09-06 17:42:34 +08:00
parent 5400f5c35d
commit e85d3daecb
2 changed files with 210 additions and 18 deletions
@@ -241,6 +241,25 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
page = (SarBussionessStandEOPage)JSONObject.toBean(jsonObject, SarBussionessStandEOPage.class);
page.setPage(1);
page.setPageSize(10000);
//查询当前登录人角色拥有权限的菜单
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
QueryWrapper<TsResource> qw = new QueryWrapper<>();
qw.eq("ID",page.getMenuId());
qw.isNull("PARENT_ID");
List<TsResource> children = iTsResourceService.list(qw);
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
} else {
page.setMenuRoleList(null);
}
List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids);
}
}
}
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
List<SarAdvanceSearchVO> searchList = com.alibaba.fastjson.JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
String advanceStr = SarAdvanceSearchUtil.createSql(searchList,"SAR_BUSS_STAND_ATTR_INFO");
@@ -250,24 +269,6 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
page.setAdvanceSearchStr(null);
}
}
List<String> getMenuIdList = new ArrayList<>();
if(userId != null){
getMenuIdList= tsUserService.getResourceUserId(userId);
}
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
} else {
page.setMenuRoleList(null);
}
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList("BUSINESS_STAND",page.getMenuId());
if(getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
}
List<String> ids = sarMenuEOService.getChildMenuList(page.getMenuId());
if (ids != null && !ids.isEmpty()) {
page.setMenuAllChildrenIdList(ids);
}
}
page.setOrderBy("SAR_BUSSIONESS_STAND.issue_time is null,SAR_BUSSIONESS_STAND.issue_time desc,SAR_BUSSIONESS_STAND.id");
if(userId != null){