合并最新main并解决学生接口冲突

This commit is contained in:
wolin_liyujie
2026-09-21 21:50:08 +08:00
3 changed files with 81 additions and 22 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ from sqlalchemy.orm import Session
statistics_router=APIRouter()
@statistics_router.get("/scores/age-over-30",response_model=SuccessResponse)
@statistics_router.get("/students/age-over-30",response_model=SuccessResponse)
def api_age_over_thirty(db:Session=Depends(get_db)):
try:
age_over_thirty_list=age_over_thirty(Student,db)
@@ -71,7 +71,7 @@ def employ_time(db:Session=Depends(get_db)):
@statistics_router.get("/employments/class-average-duration",response_model=SuccessResponse)
def avg_employ_time(db:Session=Depends(get_db)):
try:
result = avg_class(Employment,Student,db)
result = avg_emptime(Employment,Student,db)
return SuccessResponse(status_code=200,msg=result)
except NoExist as e:
raise HTTPException(status_code=404,detail=str(e))