From c0d430f4e5adf08129c2610d9d2b5446bb19c0d6 Mon Sep 17 00:00:00 2001
From: XCSDN <gitee@xcsdn.net>
Date: 星期四, 07 四月 2022 12:57:56 +0800
Subject: [PATCH] update ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java. 字典类型必须以字母开头,且字典类型只能由小写字母或加下划线还有数字组成 防止由于字典类型不符合前端开发规范而报错
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
index a2c3b5b..32ec007 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
@@ -63,9 +63,8 @@
{
tempList.add(dept.getDeptId());
}
- for (Iterator<SysDept> iterator = depts.iterator(); iterator.hasNext();)
+ for (SysDept dept : depts)
{
- SysDept dept = (SysDept) iterator.next();
// 濡傛灉鏄《绾ц妭鐐�, 閬嶅巻璇ョ埗鑺傜偣鐨勬墍鏈夊瓙鑺傜偣
if (!tempList.contains(dept.getParentId()))
{
@@ -100,7 +99,7 @@
* @return 閫変腑閮ㄩ棬鍒楄〃
*/
@Override
- public List<Integer> selectDeptListByRoleId(Long roleId)
+ public List<Long> selectDeptListByRoleId(Long roleId)
{
SysRole role = roleMapper.selectRoleById(roleId);
return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly());
@@ -140,7 +139,7 @@
public boolean hasChildByDeptId(Long deptId)
{
int result = deptMapper.hasChildByDeptId(deptId);
- return result > 0 ? true : false;
+ return result > 0;
}
/**
@@ -153,7 +152,7 @@
public boolean checkDeptExistUser(Long deptId)
{
int result = deptMapper.checkDeptExistUser(deptId);
- return result > 0 ? true : false;
+ return result > 0;
}
/**
@@ -325,6 +324,6 @@
*/
private boolean hasChild(List<SysDept> list, SysDept t)
{
- return getChildList(list, t).size() > 0 ? true : false;
+ return getChildList(list, t).size() > 0;
}
}
--
Gitblit v1.9.3