u
This commit is contained in:
@@ -13,6 +13,7 @@ OUTER APPLY (
|
||||
ORDER BY ap.sort ASC, ap.id ASC
|
||||
) first_pic
|
||||
LEFT JOIN pic ON pic.id = first_pic.pic_id
|
||||
LEFT JOIN article father ON father.id = a.fatherarticle_id
|
||||
`;
|
||||
|
||||
export const ARTICLE_LIST_COLUMNS = `
|
||||
@@ -43,13 +44,15 @@ export const ARTICLE_LIST_COLUMNS = `
|
||||
FROM article child
|
||||
WHERE child.fatherarticle_id = a.id
|
||||
) AS childCount,
|
||||
a.fatherarticle_id AS fatherArticleId,
|
||||
father.sku AS fatherSku,
|
||||
pic.thumbw AS thumbW,
|
||||
pic.thumbh AS thumbH,
|
||||
pic.thumbhash AS thumbHash
|
||||
`;
|
||||
|
||||
export const GET_CATEGORY_ID_BY_SKU = `
|
||||
SELECT TOP 1 ca.category_id AS categoryId
|
||||
SELECT TOP 1 ca.category_id AS categoryId, a.id AS articleId
|
||||
FROM article a
|
||||
INNER JOIN categoryarticle ca ON ca.article_id = a.id
|
||||
WHERE a.sku = @sku
|
||||
|
||||
Reference in New Issue
Block a user