From 23457b22c37a440e31b2431a85a0623025517b9f Mon Sep 17 00:00:00 2001 From: H Vs Date: Thu, 6 Mar 2025 11:45:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E7=A0=81=E9=AA=8C=E8=AF=81wxid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/login_resources.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/login_resources.py b/resources/login_resources.py index 3a70e4a..79132ef 100644 --- a/resources/login_resources.py +++ b/resources/login_resources.py @@ -133,6 +133,16 @@ def waitting_login_result(wxchat:gewe_chat.GeWeChatCom, token_id, app_id,region_ wxid=login_info.get('wxid',agent_tel) + cache_login_info=wxchat.get_login_info_from_cache(agent_tel) + cache_wxid=cache_login_info.get('wxid','') + if not cache_login_info and cache_wxid!=wxid: + logger.warning(f"agent_tel {agent_tel} , wxid {wxid} 与 cache_wxid {cache_wxid} 不匹配,登录失败") + wxchat.logout(token_id,app_id) + # k_message=utils.login_result_message(token_id,agent_tel,region_id,agent_token_id,'') + # kafka_helper.kafka_client.produce_message(k_message) + break + + login_info.update({'appId': app_id, 'uuid': uuid, 'tokenId': token_id,'status': 1,'headImgUrl':head_img_url,'regionId':region_id}) cache_login_info=redis_helper.redis_helper.get_hash(hash_key)