123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <?php
- namespace crmeb\services\wechat\groupChat;
- use EasyWeChat\Kernel\Exceptions\InvalidConfigException;
- use EasyWeChat\Work\ExternalContact\Client as WorkClient;
- use GuzzleHttp\Exception\GuzzleException;
- class Client extends WorkClient
- {
-
- public function addJoinWay(string $roomName, array $chatIdList, string $state, int $autoCreateRoom = 1, int $roomBaseId = 1, string $remark = null, int $scene = 2)
- {
- $data = [
- 'scene' => $scene,
- 'remark' => $remark,
- 'chat_id_list' => $chatIdList,
- 'auto_create_room' => $autoCreateRoom,
- 'room_base_name' => $roomName,
- 'room_base_id' => $roomBaseId,
- 'state' => $state
- ];
- return $this->httpPostJson('cgi-bin/externalcontact/groupchat/add_join_way', $data);
- }
-
- public function updateJoinWay(string $configId, string $roomBaseName, array $chatIdList, string $state, int $autoCreateRoom = 1, int $roomBaseId = 1, string $remark = null, int $scene = 2)
- {
- $data = [
- 'config_id' => $configId,
- 'scene' => $scene,
- 'remark' => $remark,
- 'auto_create_room' => $autoCreateRoom,
- 'room_base_name' => $roomBaseName,
- 'room_base_id' => $roomBaseId,
- 'chat_id_list' => $chatIdList,
- 'state' => $state,
- ];
- return $this->httpPostJson('cgi-bin/externalcontact/groupchat/update_join_way', $data);
- }
-
- public function getJoinWay(string $configId)
- {
- return $this->httpPostJson('cgi-bin/externalcontact/groupchat/get_join_way', ['config_id' => $configId]);
- }
-
- public function deleteJoinWay(string $configId)
- {
- return $this->httpPostJson('cgi-bin/externalcontact/groupchat/del_join_way', ['config_id' => $configId]);
- }
- }
|