Fix insertIfNotExist foreign key conflict

This commit is contained in:
Ash 2022-05-15 22:53:05 +08:00
parent f76abd98be
commit 12b2531cda
2 changed files with 4 additions and 3 deletions

View File

@ -515,8 +515,8 @@ interface ArticleDao {
""" """
INSERT INTO article INSERT INTO article
SELECT :id, :date, :title, :author, :rawDescription, SELECT :id, :date, :title, :author, :rawDescription,
:shortDescription, :fullContent, :img, :link, :feedId, :shortDescription, :fullContent, :link, :feedId,
:accountId, :isUnread, :isStarred, :isReadLater :accountId, :isUnread, :isStarred, :isReadLater, :img
WHERE NOT EXISTS(SELECT 1 FROM article WHERE link = :link AND accountId = :accountId) WHERE NOT EXISTS(SELECT 1 FROM article WHERE link = :link AND accountId = :accountId)
""" """
) )

View File

@ -96,7 +96,8 @@ class RssHelper @Inject constructor(
"RLog", "RLog",
"request rss:\n" + "request rss:\n" +
"name: ${feed.name}\n" + "name: ${feed.name}\n" +
"url: ${feed.url}\n" + "feedUrl: ${feed.url}\n" +
"url: ${it.link}\n" +
"title: ${it.title}\n" + "title: ${it.title}\n" +
"desc: ${desc}\n" + "desc: ${desc}\n" +
"content: ${content}\n" "content: ${content}\n"