From 922c1dad72019c34a70b479be3818cc93fed166b Mon Sep 17 00:00:00 2001 From: ssw Date: Tue, 30 Jun 2026 10:09:19 +0800 Subject: [PATCH] auto(284e8d004cbb): session end @ 2026-06-30T10:09:18 (+2f) --- src/commands/form/index.ts | 5 ++++- src/commands/workflow/list.ts | 14 ++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/commands/form/index.ts b/src/commands/form/index.ts index f30e10c..92fa97b 100644 --- a/src/commands/form/index.ts +++ b/src/commands/form/index.ts @@ -18,9 +18,10 @@ import { buildFormCodegenCommand } from './codegen.ts' import { buildFormBindFlowCommand } from './bindflow.ts' import { buildFormSelectorCommand } from './selector.ts' import { buildFormPreviewCommand } from './preview.ts' +import { buildFormFixEntityCommand } from './fix_entity.ts' export function buildFormCommand(): Command { - const cmd = new Command('form').description('表单 CRUD (list/info/create/update/release/delete/export/import/codegen/bindFlow/selector)') + const cmd = new Command('form').description('表单 CRUD (list/info/create/update/release/delete/export/import/codegen/bindFlow/selector/fix-entity)') cmd.addCommand(buildFormListCommand()) cmd.addCommand(buildFormInfoCommand()) cmd.addCommand(buildFormCreateCommand()) @@ -34,5 +35,7 @@ export function buildFormCommand(): Command { cmd.addCommand(buildFormSelectorCommand()) // v0.11d+ Phase 3.2: standalone HTML 预览 (AI 场景增强, 非 web 镜像) cmd.addCommand(buildFormPreviewCommand()) + // v0.12+ jxcj-2026-06-29: entity 加 @TableId(type=IdType.ASSIGN_ID) 后置补丁 + cmd.addCommand(buildFormFixEntityCommand()) return cmd } diff --git a/src/commands/workflow/list.ts b/src/commands/workflow/list.ts index 1970f78..36bf8f7 100644 --- a/src/commands/workflow/list.ts +++ b/src/commands/workflow/list.ts @@ -30,7 +30,7 @@ export function buildWorkflowListCommand(): Command { const path = todo > 0 ? `/workflow/operator/List/${todo}` : `/workflow/template${opts.category ? `?category=${opts.category}` : ''}` - const r = await c.get<{ list?: { id: string; fullName: string; enCode?: string; category?: string }[] }>(path, { + const r = await c.get<{ list?: { id: string; fullName: string; enCode?: string; category?: string; flowId?: string; enabledMark?: number; status?: number }[] }>(path, { currentPage: 1, pageSize: opts.pageSize, }) @@ -38,10 +38,16 @@ export function buildWorkflowListCommand(): Command { const list = r.data?.list || [] if (opts.json) { printJson(r.data); return } log.info(`${path} 共 ${list.length} 条`) - console.log('ID FULL_NAME ENCODE CATEGORY') - console.log('-'.repeat(100)) + // v0.12+ jxcj-2026-06-29 fix: 多输出一列 FLOW_ID (TemplateJsonEntity.id = 最新 version id) + // 作用: launchFlow / actionLaunchFlow 用 template=FLOW_ID, 不要用 ID (TemplateEntity.id) + console.log('ID FLOW_ID FULL_NAME ENCODE CATEGORY') + console.log('-'.repeat(120)) for (const t of list) { - console.log(`${String(t.id || '').padEnd(36)}${String(t.fullName || '').padEnd(22)}${String(t.enCode || '').padEnd(22)}${t.category || ''}`) + console.log(`${String(t.id || '').padEnd(36)}${String(t.flowId || '').padEnd(36)}${String(t.fullName || '').padEnd(22)}${String(t.enCode || '').padEnd(22)}${t.category || ''}`) + } + if (list.some((t) => t.id !== t.flowId)) { + log.info(` 💡 launchFlow / actionLaunchFlow 需用 FLOW_ID (≠ ID):`) + log.info(` dacli workflow launch --id= ...`) } })