u
This commit is contained in:
@@ -254,6 +254,28 @@ INSERT INTO categoryarticle (category_id, article_id)
|
||||
VALUES (@categoryId, @articleId)
|
||||
`;
|
||||
|
||||
export const LIST_PAIRED_POSTERMINAL_IDS_BY_ARTICLE = `
|
||||
SELECT DISTINCT pt.id AS posterminal_id
|
||||
FROM posterminal pt
|
||||
INNER JOIN posterminalcategory pc ON pc.posterminal_id = pt.id
|
||||
INNER JOIN categoryarticle ca ON ca.category_id = pc.category_id
|
||||
WHERE ca.article_id = @articleId
|
||||
AND pt.company_id = @companyId
|
||||
AND pt.token IS NOT NULL
|
||||
`;
|
||||
|
||||
export const INSERT_POSTERMINAL_OBITUARY = `
|
||||
INSERT INTO posterminalobituary (posterminal_id, entity_type, entity_id)
|
||||
VALUES (@posterminalId, @entityType, @entityId)
|
||||
`;
|
||||
|
||||
export const CLEAR_POSTERMINAL_OBITUARY = `
|
||||
DELETE FROM posterminalobituary
|
||||
WHERE posterminal_id = @posterminalId
|
||||
AND entity_type = @entityType
|
||||
AND entity_id = @entityId
|
||||
`;
|
||||
|
||||
export const GET_BRAND_BY_COMPANY_AND_ID = `
|
||||
SELECT id
|
||||
FROM brand
|
||||
|
||||
Reference in New Issue
Block a user