Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
install.api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Script
install.api
Commits
2323a614
Commit
2323a614
authored
Mar 16, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数校验
parent
458153d8
Pipeline
#20816
passed with stage
in 37 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
conncetion_service.py
app/conncetion/conncetion_service.py
+18
-0
No files found.
app/conncetion/conncetion_service.py
View file @
2323a614
...
...
@@ -29,6 +29,24 @@ class ConnectionService(HSBaseUCService):
:return:
'''
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
:
if
id
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment