From 89081d431c63a50d17ce1f269f204de5f51360dd Mon Sep 17 00:00:00 2001 From: AKW <2497744746@qq.com> Date: Tue, 2 Jan 2024 18:42:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jqr/ksy_http.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/jqr/ksy_http.py b/apps/jqr/ksy_http.py index 012969b..993a70d 100644 --- a/apps/jqr/ksy_http.py +++ b/apps/jqr/ksy_http.py @@ -5,14 +5,19 @@ class Http(object): BASE_URL = 'http://114.215.169.94:7035' @classmethod - def get_new_user_msg(cls, corpid, userid, external_userid=None, uid=None): + def get_new_user_msg(cls, corpid, userid, external_userid=None, chat_id=None, uid=None): uid = uid or 3 url = f'{cls.BASE_URL}/api/newusermsg/getnewusermsg' + send_type = 0 + if chat_id is not None: + send_type = 1 params = { 'corpId': corpid, 'userId': userid, 'externalUserId': external_userid, + 'groupId': chat_id, 'uId': uid, + 'sendType': send_type, } res = requests.get(url, params=params) if res.status_code == 200: @@ -42,11 +47,11 @@ class Http(object): send_form=None, content_id=None, content_name=None): """ groupId 群id; - sendType 0 私聊,1 群聊; - sendTableType 0 新客欢迎表,1 关键词回复表,2 群发任务表 - contentId 主键Id - contenrName 内容名称 - sendForm 0 极速群发,1=高级群发 +s sendType 0 私聊,1 群聊; +s sendTableType 0 新客欢迎表,1 关键词回复表,2 群发任务表 +c contentId 主键Id +c contenrName 内容名称 +s sendForm 0 极速群发,1=高级群发 """ uid = uid or 3 url = f'{cls.BASE_URL}/api/newusermsg/getappointusermsg' @@ -67,11 +72,6 @@ class Http(object): return True, res.json().get('data') return False, None - # api/newusermsg/getagentsendmsg?msgId=&corpId=&userId=&externalUserId= - # msgId jqr_sendmsgrecordinfo id字段 必传 - # corpId 企业id 非必传 - # userId 用户id 非必传 - # externalUserId 接收人id 非必传 @classmethod def get_agent_send_msg(cls, msg_id, corpid=None, userid=None, external_userid=None, uid=None): uid = uid or 3