fix tag itemview
This commit is contained in:
parent
a5ee6313d6
commit
0e488be0b9
|
@ -231,16 +231,16 @@ export default {
|
|||
}
|
||||
else {
|
||||
items = db`
|
||||
select *
|
||||
select "items".*
|
||||
from "items"
|
||||
${ tag
|
||||
? db`
|
||||
inner join (
|
||||
select "tags_assign".item_id, "tags".tag
|
||||
select "tags_assign".item_id, "tags_assign".tag_id, "tags".tag
|
||||
from "tags"
|
||||
left join "tags_assign" on "tags_assign".tag_id = "tags".id
|
||||
where "tags".tag ilike ${'%' + tag + '%'}
|
||||
group by "tags_assign".item_id, "tags".tag
|
||||
group by "tags_assign".item_id, "tags".tag, "tags_assign".tag_id
|
||||
) as st on st.item_id = "items".id`
|
||||
: db``
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ export default {
|
|||
: db``
|
||||
}
|
||||
${ tag
|
||||
? db`group by st.item_id, "items".id, "tags_assign".tag_id`
|
||||
? db`group by st.item_id, "items".id, st.tag_id`
|
||||
: db`group by "items".id`
|
||||
}
|
||||
order by "items".id desc
|
||||
|
|
Loading…
Reference in New Issue
Block a user