改造实时事件缓存同步
This commit is contained in:
@@ -32,7 +32,7 @@ import {
|
||||
import { bindKuaishouIndustryVouchersToOrderTasks } from './voucher-binding-service.js'
|
||||
import { parseAmountToFen } from '../../../utils/money.js'
|
||||
import {
|
||||
publishRealtimeEvent,
|
||||
publishAdminOrderRealtimeChange,
|
||||
publishWorkOrderRealtimeChange,
|
||||
} from '../../realtime/realtime-event-service.js'
|
||||
import type { KuaishouIndustryVoucherRow, OrderRow } from '../../../types/repository/rows.js'
|
||||
@@ -136,12 +136,7 @@ export async function handleSendCode(rawBody: JsonObject = {}) {
|
||||
now,
|
||||
})
|
||||
if (syncResult.orderId) {
|
||||
publishRealtimeEvent({
|
||||
type: 'order.changed',
|
||||
entityId: syncResult.orderId,
|
||||
scopes: ['admin_orders'],
|
||||
admin: true,
|
||||
})
|
||||
publishAdminOrderRealtimeChange(syncResult.orderId)
|
||||
}
|
||||
for (const workOrderId of syncResult.workOrderIds) {
|
||||
publishWorkOrderRealtimeChange({ workOrderId })
|
||||
|
||||
Reference in New Issue
Block a user