From 2bc1e580478a2e5c53c553be85f5cb526fa18e40 Mon Sep 17 00:00:00 2001 From: yb <739325183@qq.com> Date: Mon, 21 Sep 2026 16:18:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4=E6=A8=A1?= =?UTF-8?q?=E5=9D=97debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stu_jiuye/CURD_api.py | 2 +- stu_jiuye/dao.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stu_jiuye/CURD_api.py b/stu_jiuye/CURD_api.py index 3a1764d..f895d9a 100644 --- a/stu_jiuye/CURD_api.py +++ b/stu_jiuye/CURD_api.py @@ -66,7 +66,7 @@ def updata_stuinfo(up:PostRequest raise HTTPException(status_code=500, detail='没有更新!') return {'code': 200, 'totals': r, 'detail': '更新成功'} -@CURD.delete('/emp',tags=['删除就业信息']) +@CURD.delete('/emp/{id}',tags=['删除就业信息']) def delete_stuinfo(id:int ,db=Depends(get_db)): rows = delete_emp_dao(id, db) diff --git a/stu_jiuye/dao.py b/stu_jiuye/dao.py index e9691c7..adf4d80 100644 --- a/stu_jiuye/dao.py +++ b/stu_jiuye/dao.py @@ -100,7 +100,7 @@ def get_emp_dao( def delete_emp_dao(id,db): try: # 删除有返回值,删除的行数 - rows = db.query(Employments).filter(Employments.id == id).update( is_deleted=1 ) + rows = db.query(Employments).filter(Employments.id == id).update( {'is_deleted':1} ) except Exception as e: print(f'删除失败,{e}')