本地书籍不放入未分组,恢复之前模式
This commit is contained in:
@@ -30,8 +30,7 @@ interface BookDao {
|
|||||||
|
|
||||||
@Query(
|
@Query(
|
||||||
"""
|
"""
|
||||||
select * from books
|
select * from books where type != ${BookType.audio} and origin != '${BookType.local}'
|
||||||
where type != ${BookType.audio}
|
|
||||||
and ((SELECT sum(groupId) FROM book_groups where groupId > 0) & `group`) = 0
|
and ((SELECT sum(groupId) FROM book_groups where groupId > 0) & `group`) = 0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,7 +21,14 @@ interface BookGroupDao {
|
|||||||
@get:Query(
|
@get:Query(
|
||||||
"""
|
"""
|
||||||
SELECT * FROM book_groups where (groupId >= 0 and show > 0)
|
SELECT * FROM book_groups where (groupId >= 0 and show > 0)
|
||||||
or (groupId = -4 and show > 0 and (select count(bookUrl) from books where ((SELECT sum(groupId) FROM book_groups where groupId > 0) & `group`) = 0) > 0)
|
or (groupId = -4 and show > 0
|
||||||
|
and (
|
||||||
|
select count(bookUrl) from books
|
||||||
|
where type != '${BookType.audio}'
|
||||||
|
and origin != '${BookType.local}'
|
||||||
|
and ((SELECT sum(groupId) FROM book_groups where groupId > 0) & `group`) = 0
|
||||||
|
) > 0
|
||||||
|
)
|
||||||
or (groupId = -3 and show > 0 and (select count(bookUrl) from books where type = ${BookType.audio}) > 0)
|
or (groupId = -3 and show > 0 and (select count(bookUrl) from books where type = ${BookType.audio}) > 0)
|
||||||
or (groupId = -2 and show > 0 and (select count(bookUrl) from books where origin = '${BookType.local}') > 0)
|
or (groupId = -2 and show > 0 and (select count(bookUrl) from books where origin = '${BookType.local}') > 0)
|
||||||
or (groupId = -1 and show > 0)
|
or (groupId = -1 and show > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user