|
|
@ -112,6 +112,7 @@ class GitUtil: |
|
|
|
print('执行命令', cmd) |
|
|
|
print('执行命令', cmd) |
|
|
|
r = os.system(cmd) |
|
|
|
r = os.system(cmd) |
|
|
|
print('cine.sql写入结果', r) |
|
|
|
print('cine.sql写入结果', r) |
|
|
|
|
|
|
|
self.del_func_view() |
|
|
|
|
|
|
|
|
|
|
|
def del_func_view(self): |
|
|
|
def del_func_view(self): |
|
|
|
cmd_list = [ |
|
|
|
cmd_list = [ |
|
|
@ -125,11 +126,13 @@ class GitUtil: |
|
|
|
f'DROP FUNCTION IF EXISTS `{self.db_name}`.`GetCostMobile`;', |
|
|
|
f'DROP FUNCTION IF EXISTS `{self.db_name}`.`GetCostMobile`;', |
|
|
|
f'DROP VIEW IF EXISTS `{self.db_name}`.`retail_inventory_list`;' |
|
|
|
f'DROP VIEW IF EXISTS `{self.db_name}`.`retail_inventory_list`;' |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
print('self.db_config', self.db_config) |
|
|
|
_db_conn = pymysql.connect(**self.db_config) |
|
|
|
_db_conn = pymysql.connect(**self.db_config) |
|
|
|
_db_cursor = db_conn.cursor() |
|
|
|
_db_cursor = db_conn.cursor() |
|
|
|
_db_cursor.execute() |
|
|
|
_db_cursor.execute() |
|
|
|
for cmd in cmd_list: |
|
|
|
for cmd in cmd_list: |
|
|
|
_db_cursor.execute(cmd) |
|
|
|
r = _db_cursor.execute(cmd) |
|
|
|
|
|
|
|
print(cmd, r) |
|
|
|
_db_conn.commit() |
|
|
|
_db_conn.commit() |
|
|
|
_db_cursor.close() |
|
|
|
_db_cursor.close() |
|
|
|
_db_conn.close() |
|
|
|
_db_conn.close() |
|
|
|