|
|
@ -194,19 +194,18 @@ public class ChapterServiceImpl extends ServiceImpl<ChapterMapper, Chapter> impl |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
throw new RuntimeException("复制数据出错", e); |
|
|
|
throw new RuntimeException("复制数据出错", e); |
|
|
|
} |
|
|
|
} |
|
|
|
System.out.println(chapter); |
|
|
|
|
|
|
|
String pid = chapter.getPid(); |
|
|
|
String pid = chapter.getPid(); |
|
|
|
|
|
|
|
|
|
|
|
if (pid == null || pid.isEmpty()) { |
|
|
|
if (pid == null || pid.isEmpty()) { |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("这是新增的一个父节点"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chapter.setCreateTime(LocalDateTime.now()); |
|
|
|
chapter.setCreateTime(LocalDateTime.now()); |
|
|
|
chapter.setUpdateTime(LocalDateTime.now()); |
|
|
|
chapter.setUpdateTime(LocalDateTime.now()); |
|
|
|
|
|
|
|
|
|
|
|
this.save(chapter); |
|
|
|
this.save(chapter); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
System.out.println("这是新增的一个子节点"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chapter parentChapter = this.getById(pid); |
|
|
|
Chapter parentChapter = this.getById(pid); |
|
|
|
if (parentChapter != null) { |
|
|
|
if (parentChapter != null) { |
|
|
|