From 1af01f94eed8370a4c9aacba1206d534d723a251 Mon Sep 17 00:00:00 2001 From: wolin_chenyulin001 <123@163.com> Date: Tue, 22 Sep 2026 19:51:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8F=E7=91=95=E7=96=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PythonProject/api/employment_api.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PythonProject/api/employment_api.py b/PythonProject/api/employment_api.py index 785aa3c..6faec0e 100644 --- a/PythonProject/api/employment_api.py +++ b/PythonProject/api/employment_api.py @@ -7,15 +7,15 @@ from typing import Optional emp_api = APIRouter(tags=['学生就业管理模块']) @emp_api.get('/employment/class/{class_id}',response_model=list[EmploymentResponse],summary='获取班级学生就业信息') -def get_emp_info2(class_id: Optional[int]=Path(description='班级编号') +def get_emp_info1(class_id: Optional[int]=Path(description='班级编号') ,db=Depends(get_db)): - e2 = employment_dao.get_emp_dao(class_id=class_id, db=db) - if e2: - return e2 + e1 = employment_dao.get_emp_dao(class_id=class_id, db=db) + if e1: + return e1 raise HTTPException(status_code=404, detail='该班级就业信息不存在') @emp_api.get('/employment/students/{stu_id}',response_model=list[EmploymentResponse],summary='按照学⽣编号,公司名字,⼯资范围查询学⽣就业信息') -def get_emp_info3(stu_id:int = Path(description='学生编号') +def get_emp_info2(stu_id:int = Path(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='最高工资')