修复接单物品规则管理

This commit is contained in:
yml2213
2026-08-10 15:53:11 +08:00
parent bcde47ef97
commit 16f9531b40
6 changed files with 185 additions and 7 deletions
@@ -391,6 +391,16 @@ export async function getWorkProductRuleByKey(ruleKey: string): Promise<WorkProd
return result.rows[0] || null
}
export async function deleteWorkProductRule(
ruleId: number | string,
): Promise<{ deleted: boolean }> {
const result = await query<{ id: number }>(
'DELETE FROM work_product_rules WHERE id = $1 RETURNING id',
[Number(ruleId)],
)
return { deleted: Boolean(result.rows[0]) }
}
export async function upsertWorkProductRule(input: {
ruleKey: string
provider: string