diff --git a/PythonProject/api/employment_api.py b/PythonProject/api/employment_api.py index b500a44..688d6da 100644 --- a/PythonProject/api/employment_api.py +++ b/PythonProject/api/employment_api.py @@ -15,7 +15,7 @@ def get_emp_info1(stu_id: Optional[int]=Path(description='学生编号') raise HTTPException(status_code=404, detail='该学生就业信息不存在') @emp_api.get('/employment/class/{class_id}',response_model=list[EmploymentResponse],summary='获取班级学生就业信息') -def get_emp_info1(class_id: Optional[int]=Path(description='班级编号') +def get_emp_info2(class_id: Optional[int]=Path(description='班级编号') ,db=Depends(get_db)): e1 = employment_dao.get_emp_dao(class_id=class_id, db=db) if e1: @@ -23,7 +23,7 @@ def get_emp_info1(class_id: Optional[int]=Path(description='班级编号') raise HTTPException(status_code=404, detail='该班级就业信息不存在') @emp_api.get('/employment/students',response_model=list[EmploymentResponse],summary='按照学⽣编号,公司名字,⼯资范围查询学⽣就业信息') -def get_emp_info2(stu_id:int|None = Query(None,description='学生编号') +def get_emp_info3(stu_id:int|None = Query(None,description='学生编号') ,company_name: str|None = Query(None,description='公司名称') ,min_salary: float|None = Query(None,ge=0,description='最低工资') ,max_salary: float|None = Query(None,ge=0,description='最高工资')