新增打手问题反馈

This commit is contained in:
yml2213
2026-08-20 19:56:10 +08:00
parent e504b3a207
commit 20b1066ba3
18 changed files with 788 additions and 0 deletions
@@ -122,6 +122,32 @@ export async function createWorkerCancelRequestAdminNotification(input: {
})
}
export async function createWorkerOrderFeedbackAdminNotification(input: {
feedbackId: number
workOrderId: number
workOrderNo: string
productName: string
workerName: string
content: string
}) {
return createConfiguredWorkerPlatformNotification('feedback_submitted', {
notificationType: 'worker_order_feedback_submitted',
priority: 'high',
entityType: 'worker_order_feedback',
entityId: input.feedbackId,
dedupeKey: `worker_order_feedback:${input.feedbackId}`,
title: '有打手问题反馈待处理',
body: [
`订单:${input.workOrderNo || input.workOrderId}`,
`商品:${input.productName || '-'}`,
`打手:${input.workerName || '-'}`,
`反馈:${input.content || '-'}`,
].join(''),
actionPath: `${ADMIN_WORKER_PLATFORM_PATH}?tab=feedbacks&feedbackId=${input.feedbackId}`,
now: new Date().toISOString(),
})
}
export async function remindWorkerAcceptanceAdminNotification(workOrderId: number) {
const now = new Date().toISOString()
const eventConfig = getWorkerPlatformNotificationConfig().events.acceptance_reminded