From 0412424c9735a48fabcff1efd022965e0cfeecc4 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 31 十月 2024 01:29:52 +0800 Subject: [PATCH] redis生效时间修改 --- api/outside_api_command_callback.py | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/api/outside_api_command_callback.py b/api/outside_api_command_callback.py index d68c233..f54330e 100644 --- a/api/outside_api_command_callback.py +++ b/api/outside_api_command_callback.py @@ -1017,7 +1017,7 @@ real_place_order_after_num += val["num"] # 鑾峰彇褰撴棩鐨勯噺姣� - volume_rate = code_volumn_manager.get_volume_rate(code) + volume_rate = code_volumn_manager.CodeVolumeManager().get_volume_rate(code) # 鏄惁闇�瑕佹敞鎰� need_pay_attention = (total_left_count <= 10 or total_left_num * float( @@ -1323,6 +1323,26 @@ self.send_response({"code": 0, "data": data, "msg": f""}, client_id, request_id) + elif ctype == "get_place_order_settings": + # 鑾峰彇涔板叆涓嬪崟璁剧疆 + data = { + "radical_buy": {"price": (constant.MIN_CODE_RADICAL_BUY_PRICE, constant.MAX_CODE_RADICAL_BUY_PRICE), + "zyltgb": constant.RADICAL_BUY_ZYLTGB_AS_YI_RANGES}} + self.send_response({"code": 0, "data": data, "msg": f""}, + client_id, + request_id) + elif ctype == "set_place_order_settings": + radical_buy = data.get("radical_buy") + if radical_buy: + radical_buy = json.loads(radical_buy) + constant.MIN_CODE_RADICAL_BUY_PRICE = radical_buy["price"][0] + constant.MAX_CODE_RADICAL_BUY_PRICE = radical_buy["price"][1] + constant.RADICAL_BUY_ZYLTGB_AS_YI_RANGES = radical_buy["zyltgb"] + self.send_response({"code": 0, "data": {}, "msg": f""}, + client_id, + request_id) + + except Exception as e: logging.exception(e) -- Gitblit v1.8.0