Files
SST/PythonProject/dao/grade_dao.py
T

16 lines
379 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 *
2026-09-21 14:12:04 +08:00
def get_grade_dao( stu_id:int
2026-09-21 12:50:10 +08:00
,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="学生不存在")