u
This commit is contained in:
@@ -482,3 +482,27 @@ INNER JOIN posterminal pt ON pt.id = @posterminalId AND pt.company_id = a.compan
|
||||
WHERE pr.minmultiplier = 1
|
||||
GROUP BY pr.article_id, pr.customergroup_id
|
||||
`;
|
||||
|
||||
export const RECORD_TOMBSTONE = `
|
||||
INSERT INTO posterminaltombstone (posterminal_id, entity_type, entity_id)
|
||||
SELECT pt.id, @entityType, @entityId
|
||||
FROM posterminal pt
|
||||
WHERE pt.company_id = @companyId AND pt.token IS NOT NULL
|
||||
`;
|
||||
|
||||
export const COUNT_DELETED_ENTITIES = `
|
||||
SELECT COUNT(*) AS count
|
||||
FROM posterminaltombstone
|
||||
WHERE posterminal_id = @posterminalId AND id > @cursor
|
||||
`;
|
||||
|
||||
export const LIST_DELETED_ENTITIES = `
|
||||
SELECT TOP (@limit)
|
||||
id,
|
||||
entity_type AS entityType,
|
||||
entity_id AS entityId
|
||||
FROM posterminaltombstone
|
||||
WHERE posterminal_id = @posterminalId AND id > @cursor
|
||||
ORDER BY id ASC
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user