更新debug

This commit is contained in:
2026-09-21 15:35:45 +08:00
parent 3976d8c20e
commit def4b1d2c3
3 changed files with 8 additions and 6 deletions
+4 -4
View File
@@ -56,12 +56,12 @@ def add_address(
@CURD.put('/emp',tags=['更改就业信息'])
def updata_stuinfo(company:PostRequest
def updata_stuinfo(up:PostRequest
,id:int
,db=Depends(get_db)
):
d = company.model_dump(exclude_unset=True)
r = update_orders_dao(id=id, update_data=d, db=db)
d = up.model_dump(exclude_unset=True)
r = update_emp_dao(id=id, update_data=d, db=db)
if not r:
raise HTTPException(status_code=500, detail='没有更新!')
return {'code': 200, 'totals': r, 'detail': '更新成功'}
@@ -69,7 +69,7 @@ def updata_stuinfo(company:PostRequest
@CURD.delete('/emp',tags=['删除就业信息'])
def delete_stuinfo(id:int
,db=Depends(get_db)):
rows = delete_orders_dao(id, db)
rows = delete_emp_dao(id, db)
if not rows:
raise HTTPException(status_code=500, detail='没有删除!')
return {'code': 200, 'totals': rows, 'detail': '删除成功'}