新增:半自动履约工作台与虎牙客户授权流程
- 新增 153 半自动履约迁移、后台任务接口与客户履约接口 - 接入虎牙 Connector 登录会话、绑定与一次性 CK 注入票据 - 新增后台半自动履约页面和客户履约入口 - 完善手工履约配置、成本确认事务与运行时连接器配置 - 同步权威文档、环境示例、部署脚本和迁移展示逻辑
This commit is contained in:
@@ -191,8 +191,13 @@ export async function ensureCarrierForOrderItem(input: {
|
||||
}
|
||||
|
||||
if (channel === 'manual') {
|
||||
const config = await query<{ id: number; canonical_product_id: number | null }>(
|
||||
`SELECT id, canonical_product_id
|
||||
const config = await query<{
|
||||
id: number
|
||||
canonical_product_id: number | null
|
||||
semi_auto_enabled: boolean
|
||||
semi_auto_platform: string
|
||||
}>(
|
||||
`SELECT id, canonical_product_id, semi_auto_enabled, semi_auto_platform
|
||||
FROM manual_fulfillment_configs
|
||||
WHERE canonicalize_internal_sku(sku_key) = resolve_internal_sku($1, $2, $3)
|
||||
AND enabled = TRUE
|
||||
@@ -213,6 +218,14 @@ export async function ensureCarrierForOrderItem(input: {
|
||||
],
|
||||
onlyWhenCanonicalProductNull: true,
|
||||
})
|
||||
if (
|
||||
row.semi_auto_enabled === true &&
|
||||
['huya', 'weibo'].includes(String(row.semi_auto_platform || ''))
|
||||
) {
|
||||
const { ensureSemiAutoTasksForOrder } =
|
||||
await import('../semi-auto/semi-auto-task-service.js')
|
||||
await ensureSemiAutoTasksForOrder(order.platform_order_id)
|
||||
}
|
||||
return { ready: true, created: false, reason: 'manual_config_ready', message: '' }
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user