From d91210fd9d205558fb3a0acb7e5cc8c6f0c600f2 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 04 九月 2025 18:18:27 +0800 Subject: [PATCH] 人为移想管理 --- api/outside_api_command_callback.py | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/api/outside_api_command_callback.py b/api/outside_api_command_callback.py index f748157..b3cf24e 100644 --- a/api/outside_api_command_callback.py +++ b/api/outside_api_command_callback.py @@ -20,7 +20,7 @@ from code_attribute.code_data_util import ZYLTGBUtil from code_attribute.code_l1_data_manager import L1DataManager from code_attribute.gpcode_manager import CodePrePriceManager, CodesNameManager, WantBuyCodesManager, \ - HumanRemoveForbiddenManager, HumanForbiddenManager, CodesContinueBuyMoneyManager + HumanRemoveForbiddenManager, HumanForbiddenManager, CodesContinueBuyMoneyManager, HumanRemoveWantBuyCodesManager from db import mysql_data_delegate as mysql_data, redis_manager_delegate as redis_manager from db.redis_manager_delegate import RedisUtils from huaxin_client import l1_subscript_codes_manager @@ -290,8 +290,8 @@ code_list_type = data["code_list_type"] operate = data["operate"] code = data.get("code") - if code and not tool.is_can_buy_code(code): - raise Exception(f"涓嶆槸鍙互浜ゆ槗鐨勪唬鐮侊細{code}") + # if code and not tool.is_can_buy_code(code): + # raise Exception(f"涓嶆槸鍙互浜ゆ槗鐨勪唬鐮侊細{code}") fresult = {"code": 0} if code_list_type == outside_api_command_manager.CODE_LIST_WANT: if operate == outside_api_command_manager.OPERRATE_SET: @@ -310,6 +310,7 @@ elif operate == outside_api_command_manager.OPERRATE_DELETE: trade_record_log_util.remove_want_buy(code) gpcode_manager.WantBuyCodesManager().remove_code(code) + HumanRemoveWantBuyCodesManager().add_code(code) elif operate == outside_api_command_manager.OPERRATE_GET: codes = gpcode_manager.WantBuyCodesManager().list_code_cache() datas = [] @@ -1032,7 +1033,8 @@ except Exception as e: logger_debug.exception(e) - result = {"code": 0, "data": {"account_available_money": account_available_money, "delegates": fdatas, "rate_of_increase_step": constant.L_DOWN_RATE_INCREASE_STEP}} + result = {"code": 0, "data": {"account_available_money": account_available_money, "delegates": fdatas, + "rate_of_increase_step": constant.L_DOWN_RATE_INCREASE_STEP}} self.send_response(result, client_id, request_id) elif ctype == "get_delegated_buy_code_infos_v2": account_available_money = trade_data_manager.AccountMoneyManager().get_available_money_cache() @@ -1194,7 +1196,8 @@ async_log_util.info(logger_debug, f"缁熻瀹炴挙鐢ㄦ椂锛歿code} - {use_time}") except Exception as e: logger_debug.exception(e) - fdata["volume_info"] = code_volumn_manager.CodeVolumeManager().get_volume_rate(code, with_info=True) + fdata["volume_info"] = code_volumn_manager.CodeVolumeManager().get_volume_rate(code, + with_info=True) fdatas.append(fdata) except Exception as e: logger_debug.exception(e) @@ -1479,11 +1482,8 @@ if radical_buy.get('auto_add_want_buy_codes_time_ranges') is not None: time_ranges = radical_buy.get('auto_add_want_buy_codes_time_ranges') - constant.AUTO_ADD_WANT_BUY_CODES_TIME_RANGES = (time_ranges.split(",")[0], time_ranges.split(",")[1]) - - - - + constant.AUTO_ADD_WANT_BUY_CODES_TIME_RANGES = ( + time_ranges.split(",")[0], time_ranges.split(",")[1]) self.send_response({"code": 0, "data": {}, "msg": f""}, client_id, @@ -1628,6 +1628,8 @@ client_id, request_id) return + CancelRateHumanSettingManager().remove_l_down(code) + trade_record_log_util.add_common_msg(code, "绉婚櫎L2鎾ゅ崟姣斾緥", "璁剧疆缁拱") CodesContinueBuyMoneyManager().set_continue_buy_money(code, money) l2_trade_util.remove_from_forbidden_trade_codes(code) CodesTradeStateManager().set_trade_state(code, trade_constant.TRADE_STATE_NOT_TRADE) -- Gitblit v1.8.0