添加调用

main
RogerWork 3 months ago
parent db3cc7cd3c
commit ffcaac7bc1
  1. 5
      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()

Loading…
Cancel
Save