This commit is contained in:
owenchen committed 2026-06-04 16:02:01 +08:00
1 parent cb3fdca3e1
commit ce37c632d3
6 files changed
+89 -67

No files matched your search

+5 -10
View File
@@ -227,18 +227,13 @@ namespace CloudBuilder.AI.Service
if (aiChapters != null && aiChapters.Length > 0)
{
foreach (AiChapterEntity aiChapter in aiChapters)
{
AiSentenceEntity[] aiSentences = repositoryAiSentenceEntity.DetachedEntities.Where(x => x.ChapterId == aiChapter.ChapterId).ToArray();
AiSentenceEntity[] aiSentences = repositoryAiSentenceEntity.DetachedEntities.Where(x => x.BookId == data.AiBook.BookId).ToArray();
if (aiSentences != null && aiSentences.Length > 0)
{
if (aiSentences != null && aiSentences.Length > 0)
{
repositoryAiSentenceEntity.DeleteNow(aiSentences);
}
}
if (aiSentences != null && aiSentences.Length > 0)
{
repositoryAiSentenceEntity.DeleteNow(aiSentences);
}
repositoryAiChapterEntity.DeleteNow(aiChapters);
}