mrz
This commit is contained in:
@@ -31,13 +31,13 @@ def get_emp_info2(stu_id:int = Path(description='学生编号')
|
||||
raise HTTPException(status_code=404,detail='该学生就业信息不存在!')
|
||||
return l1
|
||||
|
||||
@emp_api.post('/employment/students/{stu_id}',response_model=EmploymentResponse,summary='新增学生就业信息')
|
||||
@emp_api.post('/employment/student/{stu_id}',summary='新增学生就业信息')
|
||||
def create_emp_info(emp:EmploymentRequest=Form(),db=Depends(get_db)):
|
||||
d=emp.model_dump(exclude_unset=False)
|
||||
r=add_emp_dao(d,db)
|
||||
if not r:
|
||||
raise HTTPException(status_code=500,detail='服务器繁忙,请稍后添加!')
|
||||
return r
|
||||
return {'code':200,'detail':'插入成功!'}
|
||||
|
||||
@emp_api.put('/employment/students/{emp_id}',summary='更新学生就业信息')
|
||||
def update_emp_info(emp_id:int,emp:UpdateEmpRequest,db=Depends(get_db)):
|
||||
|
||||
Reference in New Issue
Block a user