就业get次昂管的dao层和api接口
This commit is contained in:
@@ -6,8 +6,8 @@ from schema.employment_schema import EmlpoymentRequest,EmploymentResponse
|
|||||||
from model.all_model import ClassManagement,Employment_info
|
from model.all_model import ClassManagement,Employment_info
|
||||||
from util.database import get_db
|
from util.database import get_db
|
||||||
|
|
||||||
app = FastAPI()
|
emp_api = FastAPI()
|
||||||
@app.get('employment/students/{stu_id}',response_model=EmploymentResponse,summary='获取学生就业信息')
|
@emp_api.get('employment/students/{stu_id}',response_model=EmploymentResponse,summary='获取学生就业信息')
|
||||||
def get_emp_info1(stu_id: int,db=Depends(get_db)):
|
def get_emp_info1(stu_id: int,db=Depends(get_db)):
|
||||||
try:
|
try:
|
||||||
if stu_id:
|
if stu_id:
|
||||||
@@ -15,7 +15,7 @@ def get_emp_info1(stu_id: int,db=Depends(get_db)):
|
|||||||
except:
|
except:
|
||||||
raise HTTPException(status_code=404, detail='该学生就业信息不存在')
|
raise HTTPException(status_code=404, detail='该学生就业信息不存在')
|
||||||
|
|
||||||
@app.get('employment/class/{class_id}',summary='获取班级学生就业信息')
|
@emp_api.get('employment/class/{class_id}',summary='获取班级学生就业信息')
|
||||||
def get_emp_info2(class_id: int,db=Depends(get_db)):
|
def get_emp_info2(class_id: int,db=Depends(get_db)):
|
||||||
try:
|
try:
|
||||||
if class_id:
|
if class_id:
|
||||||
|
|||||||
Reference in New Issue
Block a user