修复接单物品规则管理
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user