chore(cost-center): 下线会与管道冲突的旧商品入口
- 移除自动发货商品同步、SKU 回填、按工单回填、人工商品归一等旧接口与按钮 - 商品目录只保留「从接单模板初始化」与手工新建 - 自动发货面板移除已失效的「重算成本快照」入口
This commit is contained in:
@@ -23,19 +23,14 @@ import {
|
||||
updateAdminProduct,
|
||||
} from '../../services/cost-center/product-catalog-service.js'
|
||||
import {
|
||||
backfillAdminAffiliateDashSkus,
|
||||
importAdminAffiliateDashPricesBaseline,
|
||||
setAdminAffiliateProductPrice,
|
||||
syncAdminAffiliateDashProducts,
|
||||
} from '../../services/cost-center/affiliate-product-service.js'
|
||||
import {
|
||||
applyAdminTemplateProductBootstrap,
|
||||
previewAdminTemplateProductBootstrap,
|
||||
} from '../../services/cost-center/template-bootstrap-service.js'
|
||||
import {
|
||||
backfillAdminWorkOrderProductSkus,
|
||||
syncAdminWorkOrderTemplateCostVersions,
|
||||
} from '../../services/cost-center/work-order-product-service.js'
|
||||
import { syncAdminWorkOrderTemplateCostVersions } from '../../services/cost-center/work-order-product-service.js'
|
||||
import type { JsonObject } from '../../types/json.js'
|
||||
import { BATCH_STATEMENT_TIMEOUT_MS, runWithStatementTimeout } from '../../db/client.js'
|
||||
import { bodyOf, idOf, sessionOf } from './request-helpers.js'
|
||||
@@ -84,38 +79,6 @@ router.post(
|
||||
),
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/cost-center/affiliate-products/sync',
|
||||
requireAdminPermission('finance.config'),
|
||||
createJsonHandler(() => syncAdminAffiliateDashProducts(), {
|
||||
successMessage: '自动发货商品已同步',
|
||||
errorMessage: '同步自动发货商品失败',
|
||||
scope: '[admin/cost-center/affiliate-products/sync]',
|
||||
audit: (_req, data) => ({
|
||||
action: 'cost_affiliate_products_synced',
|
||||
targetType: 'product_catalog',
|
||||
targetId: '',
|
||||
data: data as Record<string, unknown>,
|
||||
}),
|
||||
}),
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/cost-center/affiliate-products/backfill',
|
||||
requireAdminPermission('finance.config'),
|
||||
createJsonHandler(() => backfillAdminAffiliateDashSkus(), {
|
||||
successMessage: '自动发货 SKU 已回填',
|
||||
errorMessage: '回填自动发货 SKU 失败',
|
||||
scope: '[admin/cost-center/affiliate-products/backfill]',
|
||||
audit: (_req, data) => ({
|
||||
action: 'cost_affiliate_skus_backfilled',
|
||||
targetType: 'order_items',
|
||||
targetId: '',
|
||||
data: data as Record<string, unknown>,
|
||||
}),
|
||||
}),
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/cost-center/affiliate-products/price-baseline',
|
||||
requireAdminPermission('finance.config'),
|
||||
@@ -151,25 +114,6 @@ router.post(
|
||||
),
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/cost-center/work-order-products/backfill',
|
||||
requireAdminPermission('finance.config'),
|
||||
createJsonHandler(
|
||||
(req) => withBatchTimeout(() => backfillAdminWorkOrderProductSkus(bodyOf(req))),
|
||||
{
|
||||
successMessage: '接单平台商品已回填',
|
||||
errorMessage: '回填接单平台商品失败',
|
||||
scope: '[admin/cost-center/work-order-products/backfill]',
|
||||
audit: (_req, data) => ({
|
||||
action: 'cost_work_order_products_backfilled',
|
||||
targetType: 'order_items',
|
||||
targetId: '',
|
||||
data: data as Record<string, unknown>,
|
||||
}),
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/cost-center/work-order-template-costs/sync',
|
||||
requireAdminPermission('finance.config'),
|
||||
|
||||
Reference in New Issue
Block a user