diff --git a/update/utils/git_util.py b/update/utils/git_util.py index 48c3fce..e3cbdb0 100644 --- a/update/utils/git_util.py +++ b/update/utils/git_util.py @@ -112,6 +112,7 @@ class GitUtil: print('执行命令', cmd) r = os.system(cmd) print('cine.sql写入结果', r) + self.del_func_view() def del_func_view(self): cmd_list = [ @@ -125,11 +126,13 @@ class GitUtil: f'DROP FUNCTION IF EXISTS `{self.db_name}`.`GetCostMobile`;', 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_cursor = db_conn.cursor() _db_cursor.execute() for cmd in cmd_list: - _db_cursor.execute(cmd) + r = _db_cursor.execute(cmd) + print(cmd, r) _db_conn.commit() _db_cursor.close() _db_conn.close()