Skip to content

Commit

Permalink
Merge pull request #587 from ArtisanCloud/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Matrix-X authored Dec 11, 2024
2 parents 2dedf80 + 47a1f0f commit 7e19948
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ type ResponseTemplateGetPrivate struct {
type ResponseTemplateSend struct {
response.ResponseOfficialAccount

MsgID int `json:"msgid"`
MsgID int64 `json:"msgid"`
}
7 changes: 5 additions & 2 deletions src/work/accountService/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ func (comp *Client) AddContactWay(ctx context.Context, openKFID string, scene st

result := &response.ResponseAccountServiceAddContactWay{}

options := &object.HashMap{
var options *object.HashMap
options = &object.HashMap{
"open_kfid": openKFID,
"scene": scene,
}
if scene != "" {
(*options)["scene"] = scene
}

_, err := comp.BaseClient.HttpPostJson(ctx, "cgi-bin/kf/add_contact_way", options, nil, nil, result)
Expand Down
5 changes: 3 additions & 2 deletions src/work/accountService/customer/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ 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) (*response.ResponseCustomerBatchGet, error) {
func (comp *Client) BatchGet(ctx context.Context, externalUserIDList []string, needEnterSessionContext int8) (*response.ResponseCustomerBatchGet, error) {

result := &response.ResponseCustomerBatchGet{}

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

_, 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"`
InvalidExternalUserID []string `json:"invalid_external_userid,omitempty"`
}

0 comments on commit 7e19948

Please sign in to comment.