格式化代码

pull/4/head
smallbun 2022-12-18 19:59:41 +08:00
parent 6794c7c1ec
commit 8a5d23c1d3
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,6 @@ package cn.topiam.employee.console.service.account.impl;
import java.util.*; import java.util.*;
import liquibase.pro.packaged.L;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -276,7 +275,8 @@ public class OrganizationServiceImpl implements OrganizationService {
// 判断旧的父节点下是否还存在子节点,不存在更改此节点为叶子节点 // 判断旧的父节点下是否还存在子节点,不存在更改此节点为叶子节点
List<OrganizationEntity> childList = organizationRepository.findByParentId(oldParentId); List<OrganizationEntity> childList = organizationRepository.findByParentId(oldParentId);
if (CollectionUtils.isEmpty(childList)) { if (CollectionUtils.isEmpty(childList)) {
Optional<OrganizationEntity> oldParentOrganization = organizationRepository.findById(oldParentId); Optional<OrganizationEntity> oldParentOrganization = organizationRepository
.findById(oldParentId);
if (oldParentOrganization.isPresent()) { if (oldParentOrganization.isPresent()) {
oldParentOrganization.get().setLeaf(true); oldParentOrganization.get().setLeaf(true);
organizationRepository.save(oldParentOrganization.get()); organizationRepository.save(oldParentOrganization.get());