Merge remote-tracking branch 'origin/conding' into conding
This commit is contained in:
@@ -24,7 +24,7 @@ def get_students(stu_id:int|None=None
|
||||
raise HTTPException(status_code=404,detail='学生不存在')
|
||||
return StudentPageResponse(page=page,
|
||||
page_size=page_size,
|
||||
total=total,
|
||||
totals=total,
|
||||
data=r)
|
||||
|
||||
@StudentAPI.put('/{stu_id}',tags=['学⽣基本信息管理模块'],summary='学生信息更新接口',description='更新学生信息')
|
||||
@@ -50,7 +50,7 @@ def del_students(stu_id:int
|
||||
@StudentAPI.post('/students',tags=['学⽣基本信息管理模块'],response_model=StugetResponse,summary='学生信息新增接口',description='新增学生信息')
|
||||
def add_students(s:StudentRequest
|
||||
,db=Depends(get_db)):
|
||||
d=s.model_dump(exclude_unset=False)
|
||||
d=s.model_dump(exclude_unset=True)
|
||||
stu_new=add_student_dao(o=d,db=db)
|
||||
if not stu_new:
|
||||
raise HTTPException(status_code=500,detail='添加失败')
|
||||
|
||||
Reference in New Issue
Block a user