更新外键连接

This commit is contained in:
2026-09-21 12:22:26 +08:00
parent 72434a78bc
commit c45cae80c7
8 changed files with 23 additions and 25 deletions
+3 -2
View File
@@ -52,7 +52,7 @@ def update_orders_dao(id,update_data,db):
db.commit()
return rows
def get_orders_dao(
def get_emp_dao(
# stuid,
name
,db
@@ -92,7 +92,8 @@ def get_orders_dao(
def delete_orders_dao(id,db):
try: # 删除有返回值,删除的行数
rows = db.query(Employments).filter(Employments.id == id).delete()
rows = db.query(Employments).filter(Employments.id == id).update( is_deleted=1 )
except Exception as e:
print(f'删除失败,{e}')
db.rollback()