mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-02-08 14:44:57 +08:00
[fix] 修改文件管理归档
This commit is contained in:
parent
2b29b12235
commit
705f915efe
@ -11,8 +11,10 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*;
|
import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*;
|
||||||
@ -189,7 +191,9 @@ public class CategoryServiceImpl implements CategoryService {
|
|||||||
Long parentId = 0L;
|
Long parentId = 0L;
|
||||||
|
|
||||||
// 解析路径
|
// 解析路径
|
||||||
String[] categoryElements = path.split("/");
|
List<String> categoryElements = Arrays.stream(path.split("/"))
|
||||||
|
.filter(s -> !s.isEmpty())
|
||||||
|
.toList();
|
||||||
|
|
||||||
// 根据路径创建文件夹,并返回最后一个文件夹的id
|
// 根据路径创建文件夹,并返回最后一个文件夹的id
|
||||||
for (String categoryElement : categoryElements) {
|
for (String categoryElement : categoryElements) {
|
||||||
|
Loading…
Reference in New Issue
Block a user