From 22a4b43105abe3a7185c8f5ac36c51e30c6bc7aa Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 08 七月 2025 00:41:40 +0800 Subject: [PATCH] bug修复/策略完善 --- api/outside_api_callback.py | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/outside_api_callback.py b/api/outside_api_callback.py index fd5cbfb..f1ab133 100644 --- a/api/outside_api_callback.py +++ b/api/outside_api_callback.py @@ -235,8 +235,8 @@ fdata = { "id": record[0], "code": record[1], - "name": gpcode_manager.get_code_name(record[1]), - "platesInfo": {k: [(xx, gpcode_manager.get_code_name(xx)) for xx in v] for k, v in + "name": gpcode_manager.CodesNameManager().get_code_name(record[1]), + "platesInfo": {k: [(xx, gpcode_manager.CodesNameManager().get_code_name(xx)) for xx in v] for k, v in record[2].items()}, "time_str": record[4], "bigOrderInfo": record[3] @@ -250,7 +250,6 @@ if not record: result_json = {"code": 1, "msg": '璁板綍涓嶅瓨鍦�'} else: - code = record[1] sv: StockVariables = strategy_manager.low_suction_strtegy.stock_variables_dict.get(code) if sv is None: @@ -277,6 +276,7 @@ info=record[3] )) async_log_util.info(logger_trade, f"{code}涓嬪崟锛屾澘鍧楋細{record[2].keys()}") + result_json = {"code": 0, "msg": '澶勭悊鎴愬姛'} elif ctype == 'set_place_order_not_buy': id_ = data.get("id") place_order_record_manager = PlaceOrderRecordManager(tool.get_now_date_str()) @@ -286,6 +286,7 @@ result_json = {"code": 1, "msg": '璁板綍涓嶅瓨鍦�'} else: place_order_record_manager.set_not_buy(record[0], "鎵嬪姩椹冲洖") + result_json = {"code": 0, "msg": '澶勭悊鎴愬姛'} elif ctype == 'add_black_list': code = data.get("code") gpcode_manager.BlackListCodeManager().add_code(code) -- Gitblit v1.8.0