第四版_完整
This commit is contained in:
+2
-4
@@ -1,16 +1,14 @@
|
||||
# api/employ_api.py
|
||||
# 本文件定义 学生就业信息 的所有 API 路由(Controller 层)
|
||||
# author:王博
|
||||
from typing import List
|
||||
|
||||
from fastapi import APIRouter,HTTPException
|
||||
from fastapi.params import Depends
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from database import get_db
|
||||
from scheme.employ_scheme import EmployStatusCreate as EModel, EmployStatusResponse, EmployStatusQuery as QModel, \
|
||||
EmployQueryResponse, EmployStatusDelete as DModel
|
||||
from dao.employ_dao import StudentEmployManageDAO as Emp
|
||||
|
||||
# 创建路由器,前缀将在 main.py 中统一添加
|
||||
router = APIRouter()
|
||||
|
||||
@@ -90,7 +88,7 @@ async def batch_delete_emp_reco(emp_sta:List[DModel],db:Session = Depends(get_db
|
||||
raise HTTPException(status_code=404, detail="该学生就业记录不存在")
|
||||
|
||||
# ---------- 批量修改学生就业信息 ----------
|
||||
@router.delete('/set_emp_reco/batch/',status_code=204, # response_model=EmployStatusResponse,
|
||||
@router.put('/set_emp_reco/batch/',status_code=204, # response_model=EmployStatusResponse,
|
||||
responses={404: {"description": "该学生就业记录不存在"}})
|
||||
async def batch_set_emp_reco(emp_sta:List[EModel],db:Session = Depends(get_db)):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user