Files
SST/PythonProject/dao/grade_dao.py
T

16 lines
375 B
Python
Raw Normal View History

2026-09-21 14:06:18 +08:00
from fastapi import Depends,HTTPException
2026-09-21 12:50:10 +08:00
from util.database import get_db
from model.grade_model import *
def get_grade( stu_id:int
,db=Depends(get_db)):
2026-09-21 14:06:18 +08:00
r1 =db.query(WlScore).filter(WlScore.stu_id == stu_id,WlScore.delete_status == 0).all()
if r1:
return r1
else:
raise HTTPException(status_code=404,detail="学生不存在")