From a6fb88d74c20cc28043d75e8a5097fce49cf9a78 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期五, 15 十月 2021 15:19:42 +0800
Subject: [PATCH] update [重大更新]全业务 增加 接口文档注解 格式化代码

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 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 cbafcf4..45c6fae 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
@@ -29,7 +29,7 @@
 /**
  * 閮ㄩ棬绠$悊 鏈嶅姟瀹炵幇
  *
- * @author ruoyi
+ * @author Lion Li
  */
 @Service
 public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept, SysDept> implements ISysDeptService {
@@ -65,13 +65,13 @@
         for (SysDept dept : depts) {
             tempList.add(dept.getDeptId());
         }
-		for (SysDept dept : depts) {
-			// 濡傛灉鏄《绾ц妭鐐�, 閬嶅巻璇ョ埗鑺傜偣鐨勬墍鏈夊瓙鑺傜偣
-			if (!tempList.contains(dept.getParentId())) {
-				recursionFn(depts, dept);
-				returnList.add(dept);
-			}
-		}
+        for (SysDept dept : depts) {
+            // 濡傛灉鏄《绾ц妭鐐�, 閬嶅巻璇ョ埗鑺傜偣鐨勬墍鏈夊瓙鑺傜偣
+            if (!tempList.contains(dept.getParentId())) {
+                recursionFn(depts, dept);
+                returnList.add(dept);
+            }
+        }
         if (returnList.isEmpty()) {
             returnList = depts;
         }
@@ -224,7 +224,7 @@
         }
         int result = baseMapper.updateById(dept);
         if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors())
-			&& !StringUtils.equals("0", dept.getAncestors())) {
+                && !StringUtils.equals("0", dept.getAncestors())) {
             // 濡傛灉璇ラ儴闂ㄦ槸鍚敤鐘舵�侊紝鍒欏惎鐢ㄨ閮ㄩ棬鐨勬墍鏈変笂绾ч儴闂�
             updateParentDeptStatusNormal(dept);
         }
@@ -237,8 +237,8 @@
      * @param dept 褰撳墠閮ㄩ棬
      */
     private void updateParentDeptStatusNormal(SysDept dept) {
-		String ancestors = dept.getAncestors();
-		Long[] deptIds = Convert.toLongArray(ancestors);
+        String ancestors = dept.getAncestors();
+        Long[] deptIds = Convert.toLongArray(ancestors);
         update(null, new LambdaUpdateWrapper<SysDept>()
                 .set(SysDept::getStatus, "0")
                 .in(SysDept::getDeptId, Arrays.asList(deptIds)));
@@ -247,13 +247,13 @@
     /**
      * 淇敼瀛愬厓绱犲叧绯�
      *
-     * @param deptId 琚慨鏀圭殑閮ㄩ棬ID
+     * @param deptId       琚慨鏀圭殑閮ㄩ棬ID
      * @param newAncestors 鏂扮殑鐖禝D闆嗗悎
      * @param oldAncestors 鏃х殑鐖禝D闆嗗悎
      */
     public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) {
         List<SysDept> children = list(new LambdaQueryWrapper<SysDept>()
-                .apply("find_in_set({0},ancestors)",deptId));
+                .apply("find_in_set({0},ancestors)", deptId));
         for (SysDept child : children) {
             child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors));
         }
@@ -292,11 +292,11 @@
      */
     private List<SysDept> getChildList(List<SysDept> list, SysDept t) {
         List<SysDept> tlist = new ArrayList<SysDept>();
-		for (SysDept n : list) {
-			if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) {
-				tlist.add(n);
-			}
-		}
+        for (SysDept n : list) {
+            if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) {
+                tlist.add(n);
+            }
+        }
         return tlist;
     }
 

--
Gitblit v1.9.3