This commit is contained in:
AKW 2024-01-02 18:42:29 +08:00
parent 0cc256601a
commit 89081d431c
1 changed files with 11 additions and 11 deletions

View File

@ -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