Skip to content

Commit

Permalink
fix: GroupChat
Browse files Browse the repository at this point in the history
  • Loading branch information
Nottwoc committed Aug 20, 2023
1 parent af938e8 commit 5d1ab6d
Show file tree
Hide file tree
Showing 9 changed files with 193 additions and 118 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ CI 会在 `go1.17` 和 Go 的当前稳定版本、上一个稳定版本上跑测
- [x] 修改客户备注信息
* [x] 客户群管理
- [x] 获取客户群列表
- [ ] 获取客户群详情
- [x] 获取客户群详情
- [ ] 客户群opengid转换
* [x] 在职继承
- [x] 分配在职成员的客户
Expand Down
72 changes: 36 additions & 36 deletions apis.md.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions appchat.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ func (c *WorkwxApp) GetAppchat(chatID string) (*ChatInfo, error) {
return obj, nil
}

// GetAppChatList 获取客户群列表
func (c *WorkwxApp) GetAppChatList(req ReqChatList) (*RespAppchatList, error) {
resp, err := c.execAppchatListGet(reqAppchatList{
// GetAppChatList 获取客户群列表 企业微信接口调整 此API同GetGroupChatList 兼容处理
func (c *WorkwxApp) GetAppChatList(req ReqChatList) (*RespGroupChatList, error) {
resp, err := c.execGroupChatListGet(reqGroupChatList{
ReqChatList: req,
})
if err != nil {
return nil, err
}
return resp.RespAppchatList, nil
return resp.RespGroupChatList, nil
}

// GetAppChatInfo 获取客户群详细信息
func (c *WorkwxApp) GetAppChatInfo(chatID string) (*RespAppChatInfo, error) {
resp, err := c.execAppchatInfoGet(reqAppchatInfo{
// GetAppChatInfo 获取客户群详细信息 企业微信接口调整 此API同GetGroupChatInfo 兼容处理
func (c *WorkwxApp) GetAppChatInfo(chatID string) (*RespGroupChatInfo, error) {
resp, err := c.execGroupChatInfoGet(reqGroupChatInfo{
ChatID: chatID,
NeedName: ChatNeedName,
})
Expand Down
14 changes: 7 additions & 7 deletions chat_info.md.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions docs/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ Name|Request Type|Response Type|Access Token|URL|Doc

Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--
`execAppchatListGet`|`reqAppchatList`|`respAppchatList`|+|`POST /cgi-bin/externalcontact/groupchat/list`|[获取客户群列表](https://developer.work.weixin.qq.com/document/path/92120)
`execAppchatInfoGet`|`reqAppchatInfo`|`respAppchatInfo`|+|`POST /cgi-bin/externalcontact/groupchat/get`|[获取客户群详细](https://developer.work.weixin.qq.com/document/path/92122)
`execAppchatCreate`|`reqAppchatCreate`|`respAppchatCreate`|+|`POST /cgi-bin/appchat/create`|[创建群聊会话](https://work.weixin.qq.com/api/doc#90000/90135/90245)
`execAppchatUpdate`|`reqAppchatUpdate`|`respAppchatUpdate`|+|`POST /cgi-bin/appchat/update`|[修改群聊会话](https://work.weixin.qq.com/api/doc#90000/90135/90246)
`execAppchatGet`|`reqAppchatGet`|`respAppchatGet`|+|`GET /cgi-bin/appchat/get`|[获取群聊会话](https://work.weixin.qq.com/api/doc#90000/90135/90247)
Expand Down Expand Up @@ -185,7 +183,7 @@ Name|Request Type|Response Type|Access Token|URL|Doc
`execMsgAuditCheckRoomAgree`|`reqMsgAuditCheckRoomAgree`|`respMsgAuditCheckRoomAgree`|+|`POST /cgi-bin/msgaudit/check_room_agree`|[获取会话同意情况(群聊)](https://work.weixin.qq.com/api/doc/90000/90135/91782)
`execMsgAuditGetGroupChat`|`reqMsgAuditGetGroupChat`|`respMsgAuditGetGroupChat`|+|`POST /cgi-bin/msgaudit/groupchat/get`|[获取会话内容存档内部群信息](https://work.weixin.qq.com/api/doc/90000/90135/92951)

# 企业服务人员管理 - 联系我
# 企业服务人员管理 - 联系我与客户入群方式

## API calls

Expand All @@ -203,6 +201,15 @@ Name|Request Type|Response Type|Access Token|URL|Doc
`execUpdateGroupChatJoinWayExternalContact`|`reqUpdateGroupChatJoinWayExternalContact`|`respUpdateGroupChatJoinWayExternalContact`|+|`POST /cgi-bin/externalcontact/groupchat/update_join_way`|[更新企业已配置的客户群「加入群聊」方式](https://developer.work.weixin.qq.com/document/path/92229#%E8%8E%B7%E5%8F%96%E5%AE%A2%E6%88%B7%E7%BE%A4%E8%BF%9B%E7%BE%A4%E6%96%B9%E5%BC%8F%E9%85%8D%E7%BD%AE)
`execDelGroupChatJoinWayExternalContact`|`reqDelGroupChatJoinWayExternalContact`|`respDelGroupChatJoinWayExternalContact`|+|`POST /cgi-bin/externalcontact/groupchat/del_join_way`|[删除企业已配置的客户群「加入群聊」方式](https://developer.work.weixin.qq.com/document/path/92229#%E5%88%A0%E9%99%A4%E5%AE%A2%E6%88%B7%E7%BE%A4%E8%BF%9B%E7%BE%A4%E6%96%B9%E5%BC%8F%E9%85%8D%E7%BD%AE)

# 客户联系 - 客户群管理

## API calls

Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--
`execGroupChatListGet`|`reqGroupChatList`|`respGroupChatList`|+|`POST /cgi-bin/externalcontact/groupchat/list`|[获取客户群列表](https://developer.work.weixin.qq.com/document/path/92120)
`execGroupChatInfoGet`|`reqGroupChatInfo`|`respGroupChatInfo`|+|`POST /cgi-bin/externalcontact/groupchat/get`|[获取客户群详细](https://developer.work.weixin.qq.com/document/path/92122)

# 在职继承

## API calls
Expand All @@ -221,7 +228,7 @@ Name|Request Type|Response Type|Access Token|URL|Doc
`execTransferResignedCustomer`|`reqTransferCustomer`|`respTransferCustomer`|+|`POST /cgi-bin/externalcontact/resigned/transfer_customer`|[离职继承 分配离职成员的客户](https://developer.work.weixin.qq.com/document/path/94081)
`execGetTransferResignedCustomerResult`|`reqGetTransferCustomerResult`|`respGetTransferCustomerResult`|+|`POST /cgi-bin/externalcontact/resigned/transfer_result`|[离职继承 查询客户接替状态](https://developer.work.weixin.qq.com/document/path/94082)

# 客户联系-消息推送
# 客户联系 - 消息推送

## API calls
Name|Request Type|Response Type|Access Token|URL|Doc
Expand Down
8 changes: 4 additions & 4 deletions docs/chat_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ Name|JSON|Type|Doc
`Cursor`|`cursor`|`string`| 用于分页查询的游标,字符串类型,由上一次调用返回,首次调用不填
`Limit`|`limit`|`int64`| 分页,预期请求的数据量,取值范围 1 ~ 1000

### `RespGroupChatList` 客户群列表数据
### `GroupChatList` 客户群列表数据

Name|JSON|Type|Doc
:---|:---|:---|:--
`ChatID`|`chat_id`|`string`| 客户群ID
`Status`|`status`|`int64`| 客户群跟进状态 0 - 跟进人正常 1 - 跟进人离职 2 - 离职继承中 3 - 离职继承完成

### `RespAppchatList` 客户群列表结果
### `RespGroupChatList` 客户群列表结果

Name|JSON|Type|Doc
:---|:---|:---|:--
`GroupChatList`|`group_chat_list`|`[]RespGroupChatList`| 客户群列表
`GroupChatList`|`group_chat_list`|`[]GroupChatList`| 客户群列表
`NextCursor`|`next_cursor`|`string`| 分页游标

### `ChatMemberList` 客户群成员列表
Expand Down Expand Up @@ -65,7 +65,7 @@ Name|JSON|Type|Doc
:---|:---|:---|:--
`UserID`|`userid`|`string`| 管理员ID

### `RespAppChatInfo` 客户群详情
### `RespGroupChatInfo` 客户群详情
Name|JSON|Type|Doc
:---|:---|:---|:--
`ChatID`|`chat_id`|`string`| 客户群ID
Expand Down
Loading

0 comments on commit 5d1ab6d

Please sign in to comment.