refactor(finance)!: 事实维度与接口字段统一改名 channel

- migration 114 将 sales_daily_facts.fulfillment_mode 重命名为 channel
- DTO/查询参数/前端类型从 fulfillmentMode 统一为 channel
- 成本中心类型 FulfillmentMode 更名为 FulfillmentChannel,并补齐卡券/待分类/归档取值
- 销售事实响应分组改为 byChannel
This commit is contained in:
yml2213
2026-10-31 20:26:15 +08:00
parent 657e49f324
commit 6cd6401eca
38 changed files with 220 additions and 208 deletions
+3 -3
View File
@@ -240,7 +240,7 @@ export async function listOrdersWithExecutor(
keyword = '',
provider = '',
executorKey = '',
fulfillmentMode = '',
channel = '',
platformOrderId = '',
payStatus = '',
taskStatus = '',
@@ -334,9 +334,9 @@ export async function listOrdersWithExecutor(
)
}
if (fulfillmentMode) {
if (channel) {
// v2:渠道/状态拆列后按新列筛选;legacy_platform 统一映射成 archived。
const normalizedMode = fulfillmentMode === 'legacy_platform' ? 'archived' : fulfillmentMode
const normalizedMode = channel === 'legacy_platform' ? 'archived' : channel
if (normalizedMode === 'pending') {
filters.push(`EXISTS (
SELECT 1 FROM order_items oi