新增部分接口

This commit is contained in:
2025-03-06 16:35:01 +08:00
parent 05e2e8a59a
commit 3d39e89e26
4 changed files with 28 additions and 4 deletions

View File

@ -51,6 +51,18 @@ def get_detect_pager(detect_pager: ProjectDetectPager, session: Session):
return pager
def get_detect_list(project_id: int, session: Session):
"""
根据项目id查询所有集合的列表
:param project_id:
:param session:
:return:
"""
query = session.query(ProjectDetect).filter_by(project_id=project_id).order_by(asc(ProjectDetect.id))
result = jsonable_encoder(query.all())
return result
def update_detect_status(detect_id: int, detect_status: int, session: Session):
"""
更新项目训练状态,如果是已完成的话train_version自动+1