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)