File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
app/src/main/java/com/tinyengine/it/config/context
base/src/main/java/com/tinyengine/it/service/app/impl Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 1212package com .tinyengine .it .config .context ;
1313
1414import com .tinyengine .it .common .context .LoginUserContext ;
15+ import org .springframework .stereotype .Service ;
1516
1617/**
1718 * 默认的登录用户Context实现
1819 */
20+ @ Service
1921public class DefaultLoginUserContext implements LoginUserContext {
2022 @ Override
2123 public String getTenantId () {
Original file line number Diff line number Diff 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 *
You can’t perform that action at this time.
0 commit comments