u
This commit is contained in:
@@ -140,8 +140,10 @@ SELECT
|
||||
av.value AS attributeValue
|
||||
FROM article child
|
||||
LEFT JOIN articletext at_child ON at_child.article_id = child.id AND at_child.language_id = @languageId
|
||||
LEFT JOIN articleattributevalue aav ON aav.article_id = child.id
|
||||
LEFT JOIN attributevalue av ON av.id = aav.attributevalue_id AND av.attribute_id = @attributeId
|
||||
LEFT JOIN (
|
||||
articleattributevalue aav
|
||||
INNER JOIN attributevalue av ON av.id = aav.attributevalue_id AND av.attribute_id = @attributeId
|
||||
) ON aav.article_id = child.id
|
||||
WHERE child.fatherarticle_id = @fatherArticleId
|
||||
ORDER BY child.fathersort ASC, child.id ASC
|
||||
`;
|
||||
@@ -499,8 +501,10 @@ SELECT
|
||||
av.value AS attributeValue
|
||||
FROM article child
|
||||
LEFT JOIN articletext at_child ON at_child.article_id = child.id AND at_child.language_id = auth.languageId
|
||||
LEFT JOIN articleattributevalue aav ON aav.article_id = child.id
|
||||
LEFT JOIN attributevalue av ON av.id = aav.attributevalue_id AND av.attribute_id = a.fatherattributename_id
|
||||
LEFT JOIN (
|
||||
articleattributevalue aav
|
||||
INNER JOIN attributevalue av ON av.id = aav.attributevalue_id AND av.attribute_id = a.fatherattributename_id
|
||||
) ON aav.article_id = child.id
|
||||
WHERE child.fatherarticle_id = a.id
|
||||
ORDER BY child.fathersort ASC, child.id ASC
|
||||
FOR JSON PATH
|
||||
|
||||
@@ -4,6 +4,12 @@ FROM article
|
||||
WHERE fatherarticle_id = @articleId
|
||||
`;
|
||||
|
||||
export const GET_CHILDREN_IDS = `
|
||||
SELECT id
|
||||
FROM article
|
||||
WHERE fatherarticle_id = @id
|
||||
`;
|
||||
|
||||
export const GET_LIST_IDS = `
|
||||
SELECT articlelist_id AS articlelistId, optionslist_id AS optionslistId
|
||||
FROM article
|
||||
|
||||
Reference in New Issue
Block a user