From 5fddb78c271415eeacd3e508d353ee13afd4798e Mon Sep 17 00:00:00 2001 From: yb <739325183@qq.com> Date: Tue, 22 Sep 2026 21:23:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0db.refresh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stu_jiuye/dao.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stu_jiuye/dao.py b/stu_jiuye/dao.py index 7d0a32b..96ac30e 100644 --- a/stu_jiuye/dao.py +++ b/stu_jiuye/dao.py @@ -18,6 +18,7 @@ def add_employment_dao(o,db): #新增就业信息函数 return False else: db.commit() #提交事务,永久保存 + db.refresh(o1) return True def add_company_dao(o,db): #添加公司信息函数 @@ -34,6 +35,7 @@ def add_company_dao(o,db): #添加公司信息函数 return False else: db.commit() #提交事务,永久保存 + db.refresh(o1) return True def add_address_dao(o,db): #添加地址区域信息函数 try: @@ -49,6 +51,7 @@ def add_address_dao(o,db): #添加地址区域信息函数 return False else: db.commit() #提交事务,永久保存 + db.refresh(o1) return True