From e11822df91f14814e28060e0a07533f3ca024e65 Mon Sep 17 00:00:00 2001 From: ymq Date: Wed, 19 Aug 2026 11:38:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(project-space):=20sdlc=20=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=9B=E5=BB=BA=E8=AE=BE=E9=BB=98=E8=AE=A4=20pipeli?= =?UTF-8?q?ne=5Fid=3Dsdlc=5Fgeneral=20+=20=E5=88=97=E8=A1=A8=E6=8C=89?= =?UTF-8?q?=E7=A9=BA=E9=97=B4=E8=BF=87=E6=BB=A4=20+=20=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/sd_projects.json | 2 +- wwwroot/api/cockpit_project_picker.dspy | 2 +- wwwroot/api/get_project_options.dspy | 2 +- wwwroot/api/sd_project_create.dspy | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models/sd_projects.json b/models/sd_projects.json index aba1219..431101e 100644 --- a/models/sd_projects.json +++ b/models/sd_projects.json @@ -15,7 +15,7 @@ {"name": "tech_stack", "title": "技术栈配置(JSON)", "type": "text"}, {"name": "repo_url", "title": "主仓库地址", "type": "str", "length": 500}, {"name": "workspace_dir", "title": "项目工作目录", "type": "str", "length": 500}, - {"name": "pipeline_id", "title": "关联Pipeline定义ID", "type": "str", "length": 32}, + {"name": "pipeline_id", "title": "关联Pipeline定义ID", "type": "str", "length": 32, "default": "'sdlc_general'"}, {"name": "status", "title": "项目状态", "type": "str", "length": 20, "nullable": "no", "default": "'draft'"}, {"name": "org_id", "title": "组织ID", "type": "str", "length": 32, "nullable": "no", "default": "'0'"}, {"name": "created_by", "title": "创建人", "type": "str", "length": 32}, diff --git a/wwwroot/api/cockpit_project_picker.dspy b/wwwroot/api/cockpit_project_picker.dspy index 81c685a..c82fe99 100644 --- a/wwwroot/api/cockpit_project_picker.dspy +++ b/wwwroot/api/cockpit_project_picker.dspy @@ -5,7 +5,7 @@ dbname = get_module_dbname('pipeline-sdlc') async with DBPools().sqlorContext(dbname) as sor: recs = await sor.sqlExe( - "SELECT id, name FROM sd_projects ORDER BY name", + "SELECT id, name FROM sd_projects WHERE pipeline_id='sdlc_general' ORDER BY name", {} ) diff --git a/wwwroot/api/get_project_options.dspy b/wwwroot/api/get_project_options.dspy index 52107a9..191a412 100644 --- a/wwwroot/api/get_project_options.dspy +++ b/wwwroot/api/get_project_options.dspy @@ -1,7 +1,7 @@ result = [] try: async with get_sor_context(request._run_ns, 'pipeline') as sor: - rows = await sor.sqlExe("select id as project_id, name as project_id_text from sd_projects order by name", {}) + rows = await sor.sqlExe("select id as project_id, name as project_id_text from sd_projects where pipeline_id='sdlc_general' order by name", {}) result = list(rows) return json.dumps(result, ensure_ascii=False) except Exception as e: diff --git a/wwwroot/api/sd_project_create.dspy b/wwwroot/api/sd_project_create.dspy index 9fb82d3..0b09277 100644 --- a/wwwroot/api/sd_project_create.dspy +++ b/wwwroot/api/sd_project_create.dspy @@ -10,7 +10,7 @@ data = { 'project_type': params_kw.get('project_type', ''), 'tech_stack': params_kw.get('tech_stack', ''), 'repo_url': params_kw.get('repo_url', ''), - 'pipeline_id': params_kw.get('pipeline_id', ''), + 'pipeline_id': params_kw.get('pipeline_id', '') or 'sdlc_general', 'status': params_kw.get('status', ''), 'org_id': org_id, 'created_at': curDateString(),