This commit is contained in:
seb
2026-09-30 09:48:01 +02:00
parent 9885c489f0
commit 280a45a11f
28 changed files with 539 additions and 16 deletions

View File

@@ -45,6 +45,7 @@ FROM categoryarticle ca
INNER JOIN article a ON a.id = ca.article_id
${ARTICLE_LIST_JOINS}
WHERE ca.category_id = @categoryId
AND a.fatherarticle_id IS NULL
ORDER BY a.id
`;
@@ -110,7 +111,7 @@ WHERE parent_id = @parentId
export const UPDATE_SORT = `
UPDATE category
SET sort = @sort
SET sort = @sort, updated_at = SYSUTCDATETIME()
WHERE id = @id AND parent_id = @parentId
`;
@@ -134,7 +135,7 @@ WHERE id = @id
export const MOVE = `
UPDATE category
SET parent_id = @parentId, sort = @sort
SET parent_id = @parentId, sort = @sort, updated_at = SYSUTCDATETIME()
WHERE id = @id
`;