Merge remote-tracking branch 'origin/conding' into conding
# Conflicts: # PythonProject/api/grade_api.py # PythonProject/main.py # PythonProject/model/employment_model.py # PythonProject/model/grade_model.py
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from fastapi import Depends,HTTPException
|
||||
|
||||
from util.database import get_db
|
||||
|
||||
from model.grade_model import *
|
||||
|
||||
|
||||
def get_grade_dao( stu_id:int
|
||||
,db=Depends(get_db)):
|
||||
|
||||
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="学生不存在")
|
||||
|
||||
Reference in New Issue
Block a user