diff --git a/src/main/java/com/teaching/backend/service/impl/chapter/ChapterServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/chapter/ChapterServiceImpl.java index b9abb53..573f920 100644 --- a/src/main/java/com/teaching/backend/service/impl/chapter/ChapterServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/chapter/ChapterServiceImpl.java @@ -194,19 +194,18 @@ public class ChapterServiceImpl extends ServiceImpl impl } catch (Exception e) { throw new RuntimeException("复制数据出错", e); } - System.out.println(chapter); String pid = chapter.getPid(); if (pid == null || pid.isEmpty()) { - System.out.println("这是新增的一个父节点"); + chapter.setCreateTime(LocalDateTime.now()); chapter.setUpdateTime(LocalDateTime.now()); this.save(chapter); } else { - System.out.println("这是新增的一个子节点"); + Chapter parentChapter = this.getById(pid); if (parentChapter != null) {