This commit is contained in:
xiangwb
2017-11-20 17:52:17 +08:00
parent d7476276f0
commit 40c70a85ba
3 changed files with 5 additions and 5 deletions
@@ -18,11 +18,11 @@ public class CommonConstant {
/**
* 启用
*/
public static final String ISENABLE = "Y";
public static final String IS_ENABLE = "Y";
/**
* 禁用
*/
public static final String ISNOTENABLE = "N";
public static final String IS_NOT_ENABLE = "N";
/**
* 邮件服务器配置项
@@ -220,12 +220,12 @@ public class SysAuthorityService {
*/
private List<SysAuthority> disableChildren(String parentId) {
//获取结果
List<SysAuthority> sysAuthoritys = listByParentEnable(parentId, CommonConstant.ISENABLE);
List<SysAuthority> sysAuthoritys = listByParentEnable(parentId, CommonConstant.IS_ENABLE);
//遍历子集
List<SysAuthority> list = new ArrayList<>();
if (CollectionUtils.isNotEmpty(sysAuthoritys)) {
for (SysAuthority sysAuthority : sysAuthoritys) {
sysAuthority.setEnable(CommonConstant.ISNOTENABLE);
sysAuthority.setEnable(CommonConstant.IS_NOT_ENABLE);
sysAuthority.setModifiedTime(new Date());
list.add(sysAuthority);
list.addAll(disableChildren(sysAuthority.getId()));
@@ -67,7 +67,7 @@ public class SysAuthorityControl {
return JSONObjResult.toJSONObj("主键不能为空");
String enable = sysAuthority.getEnable();
// 如果禁用,查询是否有子节点,如果有,子节点也要被禁用
if (CommonConstant.ISNOTENABLE.equals(enable)) {
if (CommonConstant.IS_NOT_ENABLE.equals(enable)) {
// 子节点的权限都禁用
if (!sysAuthorityService.disableChildrenByParentId(sysAuthority.getId())) {
return JSONObjResult.toJSONObj("禁用子节点权限失败");