fix(work-order): 收紧补资料链接过期校验

This commit is contained in:
2026-11-01 11:12:08 +08:00
parent 15956e704f
commit 8fb28b98c7
2 changed files with 12 additions and 8 deletions
@@ -128,7 +128,7 @@ export async function markWorkOrderMaterialLinkUsedWithClient(
const result = await client.query<WorkOrderMaterialLinkRow>(
`UPDATE work_order_material_links
SET status = 'used', used_at = $2, updated_at = $2
WHERE id = $1 AND status = 'active'
WHERE id = $1 AND status = 'active' AND expires_at > $2
RETURNING *`,
[Number(linkId), now],
)