完整流程-调试
This commit is contained in:
@@ -9,6 +9,10 @@ import { upsertProductMatchRule } from '../../repositories/product-match-rule-re
|
||||
import { normalizeProductName } from '../order/product-match-service.js'
|
||||
import { query } from '../../db/client.js'
|
||||
import { getOrderFulfillmentBindingConfigs } from '../order/fulfillment-binding-config-service.js'
|
||||
import {
|
||||
getKuaishouCloudFulfillmentConfig,
|
||||
mapKuaishouCloudFulfillmentItemsToBindings,
|
||||
} from '../order/kuaishou-cloud-fulfillment-config-service.js'
|
||||
import { nowIso } from '../../utils/time.js'
|
||||
|
||||
const CORE_PROFILES = [
|
||||
@@ -53,6 +57,15 @@ const CORE_PROFILES = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
profileKey: 'kuaishou_ct_assisted',
|
||||
name: '快手 cloud 履约',
|
||||
executorKey: 'kuaishou_ct_assisted',
|
||||
requiresClaim: false,
|
||||
autoDispatch: false,
|
||||
inventoryStrategy: 'external_platform',
|
||||
requirements: [],
|
||||
},
|
||||
]
|
||||
|
||||
export async function ensureFulfillmentCatalogBootstrapped() {
|
||||
@@ -93,7 +106,10 @@ async function ensureCoreProfiles() {
|
||||
|
||||
export async function syncConfiguredFulfillmentBindings(profileMap = {}) {
|
||||
const timestamp = nowIso()
|
||||
const bindingsToApply = getOrderFulfillmentBindingConfigs()
|
||||
const bindingsToApply = [
|
||||
...getOrderFulfillmentBindingConfigs(),
|
||||
...mapKuaishouCloudFulfillmentItemsToBindings(getKuaishouCloudFulfillmentConfig()),
|
||||
]
|
||||
|
||||
await query('DELETE FROM product_match_rules')
|
||||
await query('DELETE FROM sku_fulfillment_bindings')
|
||||
|
||||
Reference in New Issue
Block a user