Skip to content

Commit

Permalink
Merge pull request #586 from ArtisanCloud/revert-583-feat-wework-cust…
Browse files Browse the repository at this point in the history
…omer-need-enter-session-context

Revert "feat: 企业微信客服-获取客户基础信息-是否需要返回客户48小时内最后一次进入会话的上下文信息"
  • Loading branch information
Matrix-X authored Dec 10, 2024
2 parents 5f6972e + 23164e3 commit 2dedf80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions src/work/accountService/customer/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ package customer

import (
"context"

"github.com/ArtisanCloud/PowerLibs/v3/object"

"github.com/ArtisanCloud/PowerWeChat/v3/src/kernel"
"github.com/ArtisanCloud/PowerWeChat/v3/src/kernel/power"
response2 "github.com/ArtisanCloud/PowerWeChat/v3/src/kernel/response"
Expand All @@ -28,21 +26,12 @@ func NewClient(app kernel.ApplicationInterface) (*Client, error) {

// 读取消息
// https://developer.work.weixin.qq.com/document/path/94670
func (comp *Client) BatchGet(ctx context.Context, externalUserIDList []string, needEnterSessionContext bool) (*response.ResponseCustomerBatchGet, error) {
func (comp *Client) BatchGet(ctx context.Context, externalUserIDList []string) (*response.ResponseCustomerBatchGet, error) {

result := &response.ResponseCustomerBatchGet{}

var need uint32

if needEnterSessionContext {
need = 1
} else {
need = 0
}

options := &object.HashMap{
"external_userid_list": externalUserIDList,
"need_enter_session_context": need,
"external_userid_list": externalUserIDList,
}

_, err := comp.BaseClient.HttpPostJson(ctx, "cgi-bin/kf/customer/batchget", options, nil, nil, result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ type ResponseCustomerBatchGet struct {
response.ResponseWork

CustomerList []*power.HashMap `json:"customer_list"`
InvalidExternalUserID []string `json:"invalid_external_userid,omitempty"`
InvalidExternalUserID []*string `json:"invalid_external_userid"`
}

0 comments on commit 2dedf80

Please sign in to comment.