删除咸鱼旧链路

This commit is contained in:
yml
2026-05-25 21:46:39 +08:00
parent 9aafddd624
commit e7aa194dde
142 changed files with 539 additions and 17373 deletions
@@ -8,7 +8,6 @@ import {
import { upsertProductMatchRule } from '../../repositories/product-match-rule-repo.js'
import { normalizeProductName } from '../order/product-match-service.js'
import { query } from '../../db/client.js'
import { getLegacyOrderFulfillmentBindingConfigs } from '../order/fulfillment-binding-config-service.js'
import {
getKuaishouCloudFulfillmentConfig,
mapKuaishouCloudFulfillmentItemsToBindings,
@@ -108,10 +107,7 @@ async function ensureCoreProfiles() {
export async function syncConfiguredFulfillmentBindings(profileMap: JsonObject = {}) {
const timestamp = nowIso()
const bindingsToApply = [
...getLegacyOrderFulfillmentBindingConfigs(),
...mapKuaishouCloudFulfillmentItemsToBindings(getKuaishouCloudFulfillmentConfig()),
]
const bindingsToApply = mapKuaishouCloudFulfillmentItemsToBindings(getKuaishouCloudFulfillmentConfig())
await query('DELETE FROM product_match_rules')
await query('DELETE FROM sku_fulfillment_bindings')
@@ -124,7 +120,7 @@ export async function syncConfiguredFulfillmentBindings(profileMap: JsonObject =
const bindingConfig = resolveBindingRuntimeConfig(binding)
const matchShopIds = resolveBindingMatchShopIds(binding)
const match = binding.match || {}
const match: JsonObject = isPlainObject(binding.match) ? binding.match : {}
const externalSkuName = String(match.externalSkuName || '').trim()
const externalItemId = String(match.externalItemId || '').trim()
const externalSkuCode = String(match.externalSkuCode || '').trim()
@@ -166,7 +162,7 @@ export async function syncConfiguredFulfillmentBindings(profileMap: JsonObject =
}
}
export function resolveBindingMatchShopIds(binding: JsonObject = {}) {
function resolveBindingMatchShopIds(binding: JsonObject = {}) {
return [String(binding.shopId || '').trim()]
}