Skip to content

Commit

Permalink
add group send code
Browse files Browse the repository at this point in the history
  • Loading branch information
DoveChen committed Dec 22, 2021
1 parent fb190a1 commit 5ca079c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Work.php
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,23 @@ public function ECGetGroupMsgResult ($msgId)
return $this->repJson;
}

public function ECGetGroupMsgTask ($sendData)
{
Utils::checkNotEmptyStr($sendData['msgid'] ?? '', 'msgid');
self::_HttpCall(self::EXTERNAL_CONTACT_GET_GROUP_MSG_TASK, 'POST', $sendData);

return $this->repJson;
}

public function ECGetGroupmsgSendResult ($sendData)
{
Utils::checkNotEmptyStr($sendData['msgid'] ?? '', 'msgid');
Utils::checkNotEmptyStr($sendData['userid'] ?? '', 'userid');
self::_HttpCall(self::EXTERNAL_CONTACT_GET_GROUPMSG_SEND_RESULT, 'POST', $sendData);

return $this->repJson;
}

public function ECSendWelcomeMsg (ExternalContactMsgTemplate $msgTemplate)
{
ExternalContactMsgTemplate::checkMsgTemplateSendArgs($msgTemplate);
Expand Down Expand Up @@ -927,6 +944,14 @@ public function EContactGetTransferResult ($handoverData)
return $this->repJson;
}

public function EContactResignedTransferResult ($handoverData)
{
$args = Utils::Object2Array($handoverData);
self::_HttpCall(self::EXTERNAL_CONTACT_TRANSFER_RESULT, 'POST', $args);

return $this->repJson;
}

public function ECGetUserBeheviorData ($behavior)
{
ExternalContactBehavior::checkBehaviorGetArgs($behavior);
Expand Down
2 changes: 2 additions & 0 deletions components/BaseWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ abstract class BaseWork extends Component
/* 消息推送 */
const EXTERNAL_CONTACT_ADD_MSG_TEMPLATE = '/cgi-bin/externalcontact/add_msg_template?access_token=ACCESS_TOKEN'; // 添加企业群发消息任务 POST
const EXTERNAL_CONTACT_GET_GROUP_MSG_RESULT = '/cgi-bin/externalcontact/get_group_msg_result?access_token=ACCESS_TOKEN'; // 获取企业群发消息发送结果 POST
const EXTERNAL_CONTACT_GET_GROUP_MSG_TASK = '/cgi-bin/externalcontact/get_groupmsg_task?access_token=ACCESS_TOKEN'; // 获取群发成员发送任务列表 POST
const EXTERNAL_CONTACT_GET_GROUPMSG_SEND_RESULT = '/cgi-bin/externalcontact/get_groupmsg_send_result?access_token=ACCESS_TOKEN'; // 获取群发成员发送任务列表 POST
const EXTERNAL_CONTACT_SEND_WELCOME_MSG = '/cgi-bin/externalcontact/send_welcome_msg?access_token=ACCESS_TOKEN'; // 发送新客户欢迎语 POST
const EXTERNAL_CONTACT_GROUP_WELCOME_TEMPLATE_ADD = '/cgi-bin/externalcontact/group_welcome_template/add?access_token=ACCESS_TOKEN'; // 添加群欢迎语素材 POST
const EXTERNAL_CONTACT_GROUP_WELCOME_TEMPLATE_EDIT = '/cgi-bin/externalcontact/group_welcome_template/edit?access_token=ACCESS_TOKEN'; // 编辑群欢迎语素材 POST
Expand Down

0 comments on commit 5ca079c

Please sign in to comment.