mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
不显示没有书籍的分组 (#4562)
This commit is contained in:
@@ -26,7 +26,8 @@ interface BookGroupDao {
|
||||
@get:Query(
|
||||
"""
|
||||
with const as (SELECT sum(groupId) sumGroupId FROM book_groups where groupId > 0)
|
||||
SELECT book_groups.* FROM book_groups, const where (groupId >= 0 and show > 0)
|
||||
SELECT book_groups.* FROM book_groups, const
|
||||
where (groupId >= 0 and show > 0 and exists (select `group` from books where books.`group` = book_groups.groupId))
|
||||
or (groupId = -1 and show > 0)
|
||||
or (groupId = -2 and show > 0 and (select count(*) from books where type & ${BookType.local} > 0) > 0)
|
||||
or (groupId = -3 and show > 0 and (select count(*) from books where type & ${BookType.audio} > 0) > 0)
|
||||
|
||||
Reference in New Issue
Block a user