后端迁移履约初始化服务
This commit is contained in:
+5
-3
@@ -68,6 +68,8 @@ const CORE_PROFILES = [
|
||||
},
|
||||
]
|
||||
|
||||
type JsonObject = Record<string, any>
|
||||
|
||||
export async function ensureFulfillmentCatalogBootstrapped() {
|
||||
const profileMap = await ensureCoreProfiles()
|
||||
await syncConfiguredFulfillmentBindings(profileMap)
|
||||
@@ -104,7 +106,7 @@ async function ensureCoreProfiles() {
|
||||
return profileMap
|
||||
}
|
||||
|
||||
export async function syncConfiguredFulfillmentBindings(profileMap = {}) {
|
||||
export async function syncConfiguredFulfillmentBindings(profileMap: JsonObject = {}) {
|
||||
const timestamp = nowIso()
|
||||
const bindingsToApply = [
|
||||
...getLegacyOrderFulfillmentBindingConfigs(),
|
||||
@@ -164,11 +166,11 @@ export async function syncConfiguredFulfillmentBindings(profileMap = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
export function resolveBindingMatchShopIds(binding = {}) {
|
||||
export function resolveBindingMatchShopIds(binding: JsonObject = {}) {
|
||||
return [String(binding.shopId || '').trim()]
|
||||
}
|
||||
|
||||
function resolveBindingRuntimeConfig(binding = {}) {
|
||||
function resolveBindingRuntimeConfig(binding: JsonObject = {}) {
|
||||
const baseConfig = isPlainObject(binding.config) ? { ...binding.config } : {}
|
||||
|
||||
if (String(binding.provider || '').trim() === '91kaquan' && String(binding.platform || '').trim() === 'kuaishou') {
|
||||
Reference in New Issue
Block a user