Commit 2323a614 authored by 金凯强's avatar 金凯强 🎨

参数校验

parent 458153d8
Pipeline #20816 passed with stage
in 37 seconds
...@@ -29,6 +29,24 @@ class ConnectionService(HSBaseUCService): ...@@ -29,6 +29,24 @@ class ConnectionService(HSBaseUCService):
:return: :return:
''' '''
id = json_data.get('id') id = json_data.get('id')
project_no = json_data.get('project_no')
db_ip = json_data.get('db_ip')
db_port = json_data.get('db_port')
db_user = json_data.get('db_user')
db_password = json_data.get('db_password')
mes_db_name = json_data.get('mes_db_name')
tiip_db_name = json_data.get('tiip_db_name')
host_ip = json_data.get('host_ip')
if not project_no \
or not db_ip \
or not db_port \
or not db_user \
or not db_password \
or not mes_db_name \
or not tiip_db_name \
or not host_ip:
raise HSException('以上参数全为必填项')
with db_driver as session: with db_driver as session:
if id: if 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