From b25e499da73d0c75bdc24f957801cd0fadf5cf0b Mon Sep 17 00:00:00 2001 From: RogerWork Date: Thu, 22 Aug 2024 10:49:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=99=E7=9A=84=E5=95=A5=E7=A0=B4=E7=8E=A9?= =?UTF-8?q?=E6=84=8F=EF=BC=8C=E4=B8=80=E5=A0=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update/utils/git_util.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/update/utils/git_util.py b/update/utils/git_util.py index e3cbdb0..dcf77db 100644 --- a/update/utils/git_util.py +++ b/update/utils/git_util.py @@ -115,6 +115,7 @@ class GitUtil: self.del_func_view() def del_func_view(self): + print('开始清除function和view') cmd_list = [ f'DROP FUNCTION IF EXISTS `{self.db_name}`.`GetCostAverage`;', f'DROP FUNCTION IF EXISTS `{self.db_name}`.`GetGoodsCount`;', @@ -126,13 +127,11 @@ 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() + _db_cursor = _db_conn.cursor() for cmd in cmd_list: r = _db_cursor.execute(cmd) - print(cmd, r) + print('清除:' + cmd + '结果:' + str(r)) _db_conn.commit() _db_cursor.close() _db_conn.close()