feat(cost-center): 卡券规则批量生成与异常标签补齐
- 新增「批量生成渠道规则」,为 tpv: 商品一次性补 third_party_voucher 规则 - 异常原因补「缺少履约载体」,渠道标签补卡券/待分类/归档/未分类
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
*/
|
||||
import { Router } from 'express'
|
||||
|
||||
import { ensureVoucherChannelRules } from '../../services/fulfillment/channel-assign-service.js'
|
||||
|
||||
import {
|
||||
backfillAdminNormalizedQuantities,
|
||||
backfillAdminProductMappings,
|
||||
@@ -364,4 +366,20 @@ router.post(
|
||||
),
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/cost-center/voucher-products/ensure-rules',
|
||||
requireAdminPermission('finance.config'),
|
||||
createJsonHandler(() => ensureVoucherChannelRules(), {
|
||||
successMessage: '卡券渠道规则已补齐',
|
||||
errorMessage: '补齐卡券渠道规则失败',
|
||||
scope: '[admin/cost-center/voucher-products/ensure-rules]',
|
||||
audit: (_req, data) => ({
|
||||
action: 'voucher_channel_rules_ensured',
|
||||
targetType: 'sku_channel_rules',
|
||||
targetId: '',
|
||||
data: data as Record<string, unknown>,
|
||||
}),
|
||||
}),
|
||||
)
|
||||
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user