新增打手撤单审核

This commit is contained in:
yml2213
2026-08-20 19:43:03 +08:00
parent d76d1e8d90
commit e504b3a207
20 changed files with 1331 additions and 8 deletions
@@ -96,6 +96,32 @@ export async function createWorkerAcceptanceAdminNotification(input: {
})
}
export async function createWorkerCancelRequestAdminNotification(input: {
requestId: number
workOrderId: number
workOrderNo: string
productName: string
workerName: string
reason: string
}) {
return createConfiguredWorkerPlatformNotification('cancel_requested', {
notificationType: 'worker_cancel_requested',
priority: 'high',
entityType: 'worker_cancel_request',
entityId: input.requestId,
dedupeKey: `worker_cancel_request:${input.requestId}`,
title: '有打手撤单申请待审核',
body: [
`订单:${input.workOrderNo || input.workOrderId}`,
`商品:${input.productName || '-'}`,
`打手:${input.workerName || '-'}`,
`原因:${input.reason || '-'}`,
].join(''),
actionPath: `${ADMIN_WORKER_PLATFORM_PATH}?tab=cancel-requests&cancelRequestId=${input.requestId}`,
now: new Date().toISOString(),
})
}
export async function remindWorkerAcceptanceAdminNotification(workOrderId: number) {
const now = new Date().toISOString()
const eventConfig = getWorkerPlatformNotificationConfig().events.acceptance_reminded