lierqiang 2 years ago
parent
commit
a100e2d13d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      common/db/mysql_help.py

+ 3 - 1
common/db/mysql_help.py

@@ -84,11 +84,13 @@ class MysqlHelper:
 
             # 执行 sql 语句
             mysql.execute(sql, value)
+            task_id = connect.insert_id()
+
             connect.commit()
             # 关闭数据库连接
             connect.close()
             # 返回查询结果,元组
-            return True
+            return task_id
         except Exception as e:
             logging.error(f"insert_values异常:{e}\n")