Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
0e76a3d6
Commit
0e76a3d6
authored
1 year ago
by
xiao-hesheng
Browse files
Options
Download
Email Patches
Plain Diff
新增角色管理脚本
parent
4768b0fa
master
core_flow
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/db/sql/sql_del_branch_info.py
+11
-4
common/db/sql/sql_del_branch_info.py
with
11 additions
and
4 deletions
+11
-4
common/db/sql/sql_del_branch_info.py
+
11
-
4
View file @
0e76a3d6
...
...
@@ -11,7 +11,7 @@ class delData(object):
cursor
=
connection
.
cursor
()
# 删除新增的院区数据,减少垃圾数据的产生,保证脚本下次还可以正常运行,接口脚本每次都使用新增数据
# sql = "DELETE from mcms_branch_info where id = '%s';" % id
sql
=
"DELETE from mcms_branch_info where name like '%东土城路院区_____';"
sql
=
"DELETE from mcms_branch_info where name like '%东土城路院区_____';"
print
(
sql
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
"commit;"
)
...
...
@@ -29,6 +29,7 @@ class delData(object):
cursor
.
execute
(
"commit;"
)
print
(
'产品调价和产品信息变更数据已删除成功'
)
cursor
.
close
()
def
Delete_sys_config
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
...
...
@@ -40,6 +41,7 @@ class delData(object):
cursor
.
execute
(
"commit;"
)
print
(
'系统配置信息已经删除成功 '
)
cursor
.
close
()
def
Delete_sysrAtomDet
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
...
...
@@ -51,6 +53,7 @@ class delData(object):
cursor
.
execute
(
"commit;"
)
print
(
'编码规则信息已经删除成功 '
)
cursor
.
close
()
def
Delete_sys_message_template
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
...
...
@@ -62,6 +65,7 @@ class delData(object):
cursor
.
execute
(
"commit;"
)
print
(
'消息通知模板类型已经删除成功 '
)
cursor
.
close
()
def
Delete_goods_pur_template
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
...
...
@@ -73,6 +77,7 @@ class delData(object):
cursor
.
execute
(
"commit;"
)
print
(
'请领模板删除成功 '
)
cursor
.
close
()
def
get_shelf_name_version
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
...
...
@@ -82,13 +87,14 @@ class delData(object):
print
(
sql
)
cursor
.
execute
(
sql
)
results
=
cursor
.
fetchone
()
str1
=
str
(
results
)
new_str1
=
str1
.
replace
(
'('
,
''
)
str1
=
str
(
results
)
new_str1
=
str1
.
replace
(
'('
,
''
)
new_str1
=
new_str1
.
replace
(
')'
,
''
)
new_str1
=
new_str1
.
replace
(
','
,
''
)
print
(
new_str1
)
cursor
.
close
()
return
new_str1
def
Delete_probeInfo
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
...
...
@@ -112,6 +118,7 @@ class delData(object):
cursor
.
execute
(
"commit;"
)
print
(
'多余库房信息删除成功 '
)
cursor
.
close
()
def
Delete_role
(
self
):
connection
=
pymysql
.
connect
(
host
=
"10.17.65.108"
,
user
=
"root"
,
password
=
"Cmic.2023"
,
database
=
"spd3_herp_test2"
,
charset
=
"utf8"
)
...
...
@@ -128,4 +135,4 @@ class delData(object):
# delData().Delete_sys_config()
# delData().Delete_sys_message_template()
# delData().get_shelf_name_version()
# delData().Delete_role()
\ No newline at end of file
# delData().Delete_role()
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets