Commit 2ee4feb0 authored by huyuchen's avatar huyuchen

菜单权限修改

parent f1756e1d
...@@ -67,7 +67,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -67,7 +67,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.eq(SysUserPermission::getEmpLoginName, user.getUsername()) .eq(SysUserPermission::getEmpLoginName, user.getUsername())
.eq(SysUserPermission::getCode,sysUserPermission.getCode()).last(CommonConstants.LAST_ONE_SQL)); .eq(SysUserPermission::getCode,sysUserPermission.getCode()).last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(permission)) { if (Common.isEmpty(permission)) {
return R.failed("只有自己有权限的维度才可新增"); return R.failed("只有自己有权限的权限类型才可新增");
} }
} }
if (CommonConstants.SIX_STRING.equals(sysUserPermission.getPermissionType()) if (CommonConstants.SIX_STRING.equals(sysUserPermission.getPermissionType())
...@@ -77,7 +77,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -77,7 +77,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.eq(SysUserPermission::getPermissionType, sysUserPermission.getPermissionType()) .eq(SysUserPermission::getPermissionType, sysUserPermission.getPermissionType())
.eq(SysUserPermission::getName,sysUserPermission.getName()).last(CommonConstants.LAST_ONE_SQL)); .eq(SysUserPermission::getName,sysUserPermission.getName()).last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(permission)) { if (Common.isNotNull(permission)) {
return R.failed("系统中已经存在对应的名称权限维度"); return R.failed("系统中已经存在对应名称的权限类型");
} }
} else { } else {
permission = this.getOne(Wrappers.<SysUserPermission>query().lambda() permission = this.getOne(Wrappers.<SysUserPermission>query().lambda()
...@@ -85,7 +85,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -85,7 +85,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.eq(SysUserPermission::getPermissionType, sysUserPermission.getPermissionType()) .eq(SysUserPermission::getPermissionType, sysUserPermission.getPermissionType())
.eq(SysUserPermission::getCode,sysUserPermission.getCode()).last(CommonConstants.LAST_ONE_SQL)); .eq(SysUserPermission::getCode,sysUserPermission.getCode()).last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(permission)) { if (Common.isNotNull(permission)) {
return R.failed("系统中已经存在对应的编码的权限维度"); return R.failed("系统中已经存在对应编码的权限类型");
} }
} }
this.save(sysUserPermission); this.save(sysUserPermission);
...@@ -300,7 +300,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -300,7 +300,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
flag.append("_"); flag.append("_");
flag.append(excel.getCode()); flag.append(excel.getCode());
if (null != uniqueMap.get(flag.toString())) { if (null != uniqueMap.get(flag.toString())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "导表中已经存在该登录名对应的权限维度的名称或者编码!", excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "导表中已经存在该登录名对应的权限类型的名称或者编码!", excel));
continue; continue;
} else { } else {
uniqueMap.put(flag.toString(), CommonConstants.ONE_STRING); uniqueMap.put(flag.toString(), CommonConstants.ONE_STRING);
...@@ -318,7 +318,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -318,7 +318,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
count = baseMapper.selectDictByName(excel.getName(), "line"); count = baseMapper.selectDictByName(excel.getName(), "line");
} }
if (count < 1) { if (count < 1) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "不存在对应维度的名称信息", excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "不存在对应权限类型的名称信息", excel));
continue; continue;
} }
permission = this.getOne(Wrappers.<SysUserPermission>query().lambda() permission = this.getOne(Wrappers.<SysUserPermission>query().lambda()
...@@ -326,7 +326,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -326,7 +326,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.eq(SysUserPermission::getPermissionType, insert.getPermissionType()) .eq(SysUserPermission::getPermissionType, insert.getPermissionType())
.eq(SysUserPermission::getName, excel.getName()).last(CommonConstants.LAST_ONE_SQL)); .eq(SysUserPermission::getName, excel.getName()).last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(permission)) { if (Common.isNotNull(permission)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "系统中已经存在该用户对应的名称权限维度", excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "系统中已经存在该用户对应的名称的权限类型", excel));
continue; continue;
} }
insert.setCode(null); insert.setCode(null);
...@@ -334,7 +334,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -334,7 +334,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
//判断对应维度的编码是否存在 //判断对应维度的编码是否存在
Integer count = this.checkExit(insert.getPermissionType(), excel.getCode()); Integer count = this.checkExit(insert.getPermissionType(), excel.getCode());
if (count < 1) { if (count < 1) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "不存在对应维度的编码信息", excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "不存在对应权限类型的编码信息", excel));
continue; continue;
} }
permission = this.getOne(Wrappers.<SysUserPermission>query().lambda() permission = this.getOne(Wrappers.<SysUserPermission>query().lambda()
...@@ -342,7 +342,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -342,7 +342,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.eq(SysUserPermission::getPermissionType, insert.getPermissionType()) .eq(SysUserPermission::getPermissionType, insert.getPermissionType())
.eq(SysUserPermission::getCode, excel.getCode()).last(CommonConstants.LAST_ONE_SQL)); .eq(SysUserPermission::getCode, excel.getCode()).last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(permission)) { if (Common.isNotNull(permission)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "系统中已经存在该用户对应的编码的权限维度", excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "系统中已经存在该用户对应的编码的权限类型", excel));
continue; continue;
} }
} }
...@@ -356,7 +356,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -356,7 +356,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.eq(SysUserPermission::getPermissionType, insert.getPermissionType()) .eq(SysUserPermission::getPermissionType, insert.getPermissionType())
.eq(SysUserPermission::getCode, excel.getCode()).last(CommonConstants.LAST_ONE_SQL)); .eq(SysUserPermission::getCode, excel.getCode()).last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(permission)) { if (Common.isEmpty(permission)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "只有自己有权限的维度才可导入", excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "只有自己有权限的权限类型才可导入", excel));
continue; continue;
} }
} }
......
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