新增打手撤单审核
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user