fix(order-service): 回填未提交工单的最新资料配置

This commit is contained in:
yml2213
2026-11-04 12:02:46 +08:00
parent d576e8a2b1
commit b83741cbf7
6 changed files with 81 additions and 3 deletions
@@ -7,6 +7,7 @@ import { createHttpError } from '../../utils/http.js'
import { nowIso } from '../../utils/time.js'
import {
archiveOrderServiceProfile,
backfillPendingOrderServiceSnapshotsForCategory,
createOrderServiceProfileVersion,
getOrderServiceProfileVersion,
getPublishedOrderServiceProfileByCategory,
@@ -171,7 +172,12 @@ export async function publishAdminOrderServiceProfile(
adminUserId,
})
await setOrderServiceProfileCurrentVersion(client, { profileId, versionId })
return { versionNo, profileId, versionId }
const backfilledPendingOrders = await backfillPendingOrderServiceSnapshotsForCategory(client, {
categoryId: Number(profile.category_id),
profileId,
versionId,
})
return { versionNo, profileId, versionId, backfilledPendingOrders }
})
}