Commit d9931267 authored by huyuchen's avatar huyuchen

菜单权限修改

parent 18dacef7
......@@ -61,7 +61,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
YifuUser user = SecurityUtils.getUser();
//非管理员判断是否包含此权限维度
SysUserPermission permission;
if (!CommonConstants.ONE_STRING.equals(user.getId())) {
if (Common.isNotNull(user.getId()) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) {
permission = this.getOne(Wrappers.<SysUserPermission>query().lambda()
.eq(SysUserPermission::getPermissionStatus, CommonConstants.ZERO_STRING)
.eq(SysUserPermission::getEmpLoginName, user.getUsername())
......@@ -155,7 +155,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
iPage = baseMapper.selectQuotationVO(page, searchVo.getName());
} else if (CommonConstants.FOUR_STRING.equals(searchVo.getType())) {
//合同权限
if (CommonConstants.ONE_STRING.equals(user.getId())) {
if (Common.isNotNull(user.getId()) && CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
iPage = baseMapper.selectContractVO(page, searchVo.getName());
} else {
iPage = baseMapper.selectContractSimpleVO(page, user.getUsername(),searchVo.getName(),searchVo.getType());
......@@ -165,7 +165,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
iPage = baseMapper.selectDeptVO(page, searchVo.getName());
} else {
//项目权限
if (CommonConstants.ONE_STRING.equals(user.getId())) {
if (Common.isNotNull(user.getId()) && CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
iPage = baseMapper.selectSettleVO(page, searchVo.getName());
} else {
iPage = baseMapper.selectContractSimpleVO(page, user.getUsername(),searchVo.getName(),searchVo.getType());
......@@ -179,7 +179,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
@Override
public List<SysDictVo> selectDictByType(String type) {
YifuUser user = SecurityUtils.getUser();
if ("permission".equals(type) && !CommonConstants.ONE_STRING.equals(user.getId())) {
if ("permission".equals(type) && Common.isNotNull(user.getId()) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) {
return baseMapper.selectDictByTypeOne(type,CommonConstants.ZERO_STRING);
} else {
return baseMapper.selectDictByType(type);
......@@ -360,7 +360,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
//非管理员的用户只能导入合同和项目权限维度的数据且只有自己有权限的维度才可导入
//当登录人不是管理员时根据导表登录名查询权限数据
if (!CommonConstants.ONE_STRING.equals(user.getId())) {
if (Common.isNotNull(user.getId()) && CommonConstants.ONE_STRING.equals(user.getSystemFlag())) {
permission = this.getOne(Wrappers.<SysUserPermission>query().lambda()
.eq(SysUserPermission::getPermissionStatus, CommonConstants.ZERO_STRING)
.eq(SysUserPermission::getEmpLoginName, user.getUsername())
......
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