fix(order-service): 回填未提交工单的最新资料配置
This commit is contained in:
@@ -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 }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user