调整新用户信息
This commit is contained in:
3
robot.py
3
robot.py
@@ -194,8 +194,7 @@ class Robot(Job):
|
|||||||
# 添加到数据库
|
# 添加到数据库
|
||||||
# 这里假设 contacts_db 有 save_contact_info 方法,参数为 dict
|
# 这里假设 contacts_db 有 save_contact_info 方法,参数为 dict
|
||||||
resp = self.client.get_chatroom_member_detail(self.app_id, msg.roomid, [wxid])
|
resp = self.client.get_chatroom_member_detail(self.app_id, msg.roomid, [wxid])
|
||||||
resp_obj = json_to_object(resp)
|
infos = resp.get('data', {})
|
||||||
infos = resp_obj.data
|
|
||||||
for info in infos:
|
for info in infos:
|
||||||
self.LOG.info(f"已添加新用户信息到数据库: {wxid}")
|
self.LOG.info(f"已添加新用户信息到数据库: {wxid}")
|
||||||
# 更新缓存
|
# 更新缓存
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class MessageStorage:
|
|||||||
# "fileUrl": "/download/20240720/wx_BTVoJ_o_r6DpxNCNiycFE/0ca5b675-8e2c-4dc1-b288-3c44a40086ec4"
|
# "fileUrl": "/download/20240720/wx_BTVoJ_o_r6DpxNCNiycFE/0ca5b675-8e2c-4dc1-b288-3c44a40086ec4"
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
# 解析JSON
|
# 解析JSON http://192.168.2.240:2532/download/20250428/wx_3BC6eSHGE5xEm_hH3__7c/03ab5c03-5524-4a39-aabe-27ca014a4d1e.png
|
||||||
if json and json.get('data') and json['data'].get('fileUrl'):
|
if json and json.get('data') and json['data'].get('fileUrl'):
|
||||||
file_url = json['data']['fileUrl']
|
file_url = json['data']['fileUrl']
|
||||||
if file_url:
|
if file_url:
|
||||||
|
|||||||
Reference in New Issue
Block a user