Commit 846d2e8b authored by 金凯强's avatar 金凯强 🎨

bug修复

设置登录信息加强
host_ip的写入
parent afb1759e
......@@ -27,7 +27,9 @@ class AuthorizationService(HSBaseUCService):
:param json_data:
:return:
'''
session_info = json.dumps(json_data)
user_name = json_data.get('user_name')
password = json_data.get('password')
session_info = json.dumps({'user_name': user_name, 'password': password})
with open(session_info_path, 'w') as f:
f.write(session_info)
......
......@@ -34,7 +34,7 @@ class ConnectionService(HSBaseUCService):
if id:
update_sql = '''update project_info
set project_no=:project_no,db_ip=:db_ip,db_port=:db_port,db_user=:db_user
,db_password=:db_password,mes_db_name=:mes_db_name,tiip_db_name=:tiip_db_name
,db_password=:db_password,mes_db_name=:mes_db_name,tiip_db_name=:tiip_db_name,host_ip=:host_ip
where id=:id'''
session.exec_sql(update_sql, json_data)
......@@ -43,10 +43,10 @@ where id=:id'''
json_data['id'] = id
insert_sql = '''insert into project_info
(id,project_no,db_ip,db_port,db_user
,db_password,mes_db_name,tiip_db_name)
,db_password,mes_db_name,tiip_db_name,host_ip)
values
(:id,:project_no,:db_ip,:db_port,:db_user
,:db_password,:mes_db_name,:tiip_db_name)'''
,:db_password,:mes_db_name,:tiip_db_name,:host_ip)'''
session.exec_sql(insert_sql, json_data)
data = session.retrive_sql('select * from project_info where id=:id',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment