feat(project-space): sdlc 项目创建设默认 pipeline_id=sdlc_general + 列表按空间过滤 + 模型加默认值

This commit is contained in:
ymq 2026-08-19 11:38:28 +08:00
parent 8beff51654
commit e11822df91
4 changed files with 4 additions and 4 deletions

View File

@ -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},

View File

@ -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",
{}
)

View File

@ -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:

View File

@ -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(),