u
This commit is contained in:
@@ -13,6 +13,14 @@ OUTER APPLY (
|
||||
ORDER BY ap.sort ASC, ap.id ASC
|
||||
) first_pic
|
||||
LEFT JOIN pic ON pic.id = first_pic.pic_id
|
||||
LEFT JOIN brand b ON b.id = a.brand_id
|
||||
OUTER APPLY (
|
||||
SELECT TOP 1 bp.pic_id
|
||||
FROM brandpic bp
|
||||
WHERE bp.brand_id = b.id
|
||||
ORDER BY bp.sort ASC, bp.id ASC
|
||||
) first_brand_pic
|
||||
LEFT JOIN pic brand_pic ON brand_pic.id = first_brand_pic.pic_id
|
||||
LEFT JOIN article father ON father.id = a.fatherarticle_id
|
||||
`;
|
||||
|
||||
@@ -49,7 +57,13 @@ export const ARTICLE_LIST_COLUMNS = `
|
||||
pic.hash AS fullHash,
|
||||
pic.thumbw AS thumbW,
|
||||
pic.thumbh AS thumbH,
|
||||
pic.thumbhash AS thumbHash
|
||||
pic.thumbhash AS thumbHash,
|
||||
b.id AS brandId,
|
||||
b.name AS brandName,
|
||||
brand_pic.hash AS brandFullHash,
|
||||
brand_pic.thumbw AS brandThumbW,
|
||||
brand_pic.thumbh AS brandThumbH,
|
||||
brand_pic.thumbhash AS brandThumbHash
|
||||
`;
|
||||
|
||||
export const GET_CATEGORY_ID_BY_SKU = `
|
||||
@@ -362,7 +376,9 @@ SELECT
|
||||
u.basesifactor AS unitBasesifactor,
|
||||
ut.symbol AS unitSymbol,
|
||||
ut.name AS unitName,
|
||||
b.id AS brandId,
|
||||
b.name AS brandName,
|
||||
bp.hash AS brandFullHash,
|
||||
bp.thumbw AS brandThumbW,
|
||||
bp.thumbh AS brandThumbH,
|
||||
bp.thumbhash AS brandThumbHash,
|
||||
|
||||
Reference in New Issue
Block a user