From cf56535678d3a4cb265038545deef56ba6258e22 Mon Sep 17 00:00:00 2001 From: wangxu <1318272526@qq.com> Date: Thu, 13 Nov 2025 15:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E5=8A=A0=E8=BD=BDmysql=E9=93=BE=E6=8E=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common_worker.py | 2 +- app/tmnet_db_func.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/common_worker.py b/app/common_worker.py index 9c86ef7..5feb6cf 100644 --- a/app/common_worker.py +++ b/app/common_worker.py @@ -259,7 +259,7 @@ def init_with_config(): if config.has_option('rpc', 'host_inner'): g_config['rpc_host'] = config.get('rpc', 'host_inner') if config.has_option('user_dbinfo', 'host_inner'): - g_user_db['host'] = config.get('user_db', 'host_inner') + g_user_db['host'] = config.get('user_dbinfo', 'host_inner') if config.has_option('cross_delay_db', 'host_inner'): g_cross_delay_db['host'] = config.get('cross_delay_db', 'host_inner') print(g_dbinfo) diff --git a/app/tmnet_db_func.py b/app/tmnet_db_func.py index 4d80e14..ebc76e6 100644 --- a/app/tmnet_db_func.py +++ b/app/tmnet_db_func.py @@ -68,6 +68,9 @@ class TmnetDbHelper(TableDbHelperBase): left join (select name,crossid, location,nodeid, area_id from `cross_ledger_update_info` where nodeid = %s and area_id = %s and at_edge=0 and isdeleted=0 ) as t2 on t1.crossid=t2.crossid """ % (nodeid, area_id, nodeid, area_id) cross_list = self.do_select(sql) + virtual_cross_sql = f'select name, crossid, location, nodeid, area_id from user_defined_cross where nodeid = {nodeid} and area_id = {area_id}' + virtual_cross_list = self.do_select(virtual_cross_sql) + cross_list.extend(virtual_cross_list) if area_id != 0: area_cross_sql = f'select * from bound_crosses where nodeid = {nodeid} and area_id = {area_id}' area_crosses = self.do_select(area_cross_sql)