Skip to content

Commit 2ab1ef1

Browse files
committed
fix:modify issues
1 parent ab39d61 commit 2ab1ef1

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

app/src/main/java/com/tinyengine/it/config/context/DefaultLoginUserContext.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
package com.tinyengine.it.config.context;
1313

1414
import com.tinyengine.it.common.context.LoginUserContext;
15+
import org.springframework.stereotype.Service;
1516

1617
/**
1718
* 默认的登录用户Context实现
1819
*/
20+
@Service
1921
public class DefaultLoginUserContext implements LoginUserContext {
2022
@Override
2123
public String getTenantId() {

base/src/main/java/com/tinyengine/it/service/app/impl/PageServiceImpl.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,6 @@ public Result<Page> update(Page page) {
379379
}
380380
page.setDepth(depthInfo.getData() + 1);
381381
}
382-
// getFolder 获取父类信息
383-
Page parentInfo = pageMapper.queryPageById(page.getId());
384-
// 当更新参数中没有depth 或 depth没有发生改变时
385-
if (shouldUpdateDepth(page, parentInfo)) {
386-
return performUpdate(page);
387-
}
388382
// 如果深度发生改变,执行更新
389383
return performUpdate(page);
390384
}
@@ -436,11 +430,6 @@ private Result<Page> performUpdate(Page page) {
436430
return Result.success(updatedPage);
437431
}
438432

439-
// 判断是否需要更新深度
440-
private boolean shouldUpdateDepth(Page page, Page parentInfo) {
441-
return page.getDepth() == 0 || page.getDepth().equals(parentInfo.getDepth());
442-
}
443-
444433
/**
445434
* 获取文件夹深度
446435
*

0 commit comments

Comments
 (0)