From 86434619c3f653b6b825b594a1f238c3a0dbef22 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Fri, 6 Jan 2023 16:55:58 +0800 Subject: [PATCH 1/8] refactor: interface{} -> any ```sh rg -l 'interface\{\}' | xargs sed -i 's@interface{}@any@g' ``` --- client.go | 10 +++++----- internal/errcodegen/emit.go | 2 +- internal/errcodegen/main.go | 2 +- internal/sdkcodegen/emit.go | 2 +- message.go | 24 ++++++++++++------------ models.go | 6 +++--- models_test.go | 12 ++++++------ webhook_client.go | 4 ++-- webhook_message.go | 8 ++++---- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/client.go b/client.go index ff87983..300695a 100644 --- a/client.go +++ b/client.go @@ -63,7 +63,7 @@ func (c *Workwx) WithApp(corpSecret string, agentID int64) *WorkwxApp { return &app } -func (c *WorkwxApp) composeQyapiURL(path string, req interface{}) (*url.URL, error) { +func (c *WorkwxApp) composeQyapiURL(path string, req any) (*url.URL, error) { values := url.Values{} if valuer, ok := req.(urlValuer); ok { values = valuer.intoURLValues() @@ -81,7 +81,7 @@ func (c *WorkwxApp) composeQyapiURL(path string, req interface{}) (*url.URL, err return base, nil } -func (c *WorkwxApp) composeQyapiURLWithToken(path string, req interface{}, withAccessToken bool) (*url.URL, error) { +func (c *WorkwxApp) composeQyapiURLWithToken(path string, req any, withAccessToken bool) (*url.URL, error) { url, err := c.composeQyapiURL(path, req) if err != nil { return nil, err @@ -103,7 +103,7 @@ func (c *WorkwxApp) composeQyapiURLWithToken(path string, req interface{}, withA return url, nil } -func (c *WorkwxApp) executeQyapiGet(path string, req urlValuer, respObj interface{}, withAccessToken bool) error { +func (c *WorkwxApp) executeQyapiGet(path string, req urlValuer, respObj any, withAccessToken bool) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) if err != nil { return err @@ -125,7 +125,7 @@ func (c *WorkwxApp) executeQyapiGet(path string, req urlValuer, respObj interfac return nil } -func (c *WorkwxApp) executeQyapiJSONPost(path string, req bodyer, respObj interface{}, withAccessToken bool) error { +func (c *WorkwxApp) executeQyapiJSONPost(path string, req bodyer, respObj any, withAccessToken bool) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) if err != nil { return err @@ -155,7 +155,7 @@ func (c *WorkwxApp) executeQyapiJSONPost(path string, req bodyer, respObj interf func (c *WorkwxApp) executeQyapiMediaUpload( path string, req mediaUploader, - respObj interface{}, + respObj any, withAccessToken bool, ) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) diff --git a/internal/errcodegen/emit.go b/internal/errcodegen/emit.go index de329a4..7fb7d09 100644 --- a/internal/errcodegen/emit.go +++ b/internal/errcodegen/emit.go @@ -30,7 +30,7 @@ type goEmitter struct { var _ emitter = (*goEmitter)(nil) -func (e *goEmitter) e(format string, a ...interface{}) (n int, err error) { +func (e *goEmitter) e(format string, a ...any) (n int, err error) { return fmt.Fprintf(&e.buf, format, a...) } diff --git a/internal/errcodegen/main.go b/internal/errcodegen/main.go index 3a84756..34447d7 100644 --- a/internal/errcodegen/main.go +++ b/internal/errcodegen/main.go @@ -33,7 +33,7 @@ var h5Regexp = regexp.MustCompile(`]*>.*`) var mdLinkRegexp = regexp.MustCompile(`\[([^\]]+)\]\((https?://[^)]+)\)`) -func die(format string, a ...interface{}) { +func die(format string, a ...any) { fmt.Fprintf(os.Stderr, format, a...) os.Exit(1) // unreachable diff --git a/internal/sdkcodegen/emit.go b/internal/sdkcodegen/emit.go index 7fa6d18..183021c 100644 --- a/internal/sdkcodegen/emit.go +++ b/internal/sdkcodegen/emit.go @@ -23,7 +23,7 @@ type goEmitter struct { var _ emitter = (*goEmitter)(nil) -func (e *goEmitter) e(format string, a ...interface{}) (n int, err error) { +func (e *goEmitter) e(format string, a ...any) (n int, err error) { return fmt.Fprintf(&e.buf, format, a...) } diff --git a/message.go b/message.go index b638596..72323b9 100644 --- a/message.go +++ b/message.go @@ -13,7 +13,7 @@ func (c *WorkwxApp) SendTextMessage( content string, isSafe bool, ) error { - return c.sendMessage(recipient, "text", map[string]interface{}{"content": content}, isSafe) + return c.sendMessage(recipient, "text", map[string]any{"content": content}, isSafe) } // SendImageMessage 发送图片消息 @@ -28,7 +28,7 @@ func (c *WorkwxApp) SendImageMessage( return c.sendMessage( recipient, "image", - map[string]interface{}{ + map[string]any{ "media_id": mediaID, }, isSafe, ) @@ -46,7 +46,7 @@ func (c *WorkwxApp) SendVoiceMessage( return c.sendMessage( recipient, "voice", - map[string]interface{}{ + map[string]any{ "media_id": mediaID, }, isSafe, ) @@ -66,7 +66,7 @@ func (c *WorkwxApp) SendVideoMessage( return c.sendMessage( recipient, "video", - map[string]interface{}{ + map[string]any{ "media_id": mediaID, "description": description, // TODO: 零值 "title": title, // TODO: 零值 @@ -86,7 +86,7 @@ func (c *WorkwxApp) SendFileMessage( return c.sendMessage( recipient, "file", - map[string]interface{}{ + map[string]any{ "media_id": mediaID, }, isSafe, ) @@ -107,7 +107,7 @@ func (c *WorkwxApp) SendTextCardMessage( return c.sendMessage( recipient, "textcard", - map[string]interface{}{ + map[string]any{ "title": title, "description": description, "url": url, @@ -128,7 +128,7 @@ func (c *WorkwxApp) SendNewsMessage( return c.sendMessage( recipient, "news", - map[string]interface{}{ + map[string]any{ "articles": articles, }, isSafe, ) @@ -146,7 +146,7 @@ func (c *WorkwxApp) SendMPNewsMessage( return c.sendMessage( recipient, "mpnews", - map[string]interface{}{ + map[string]any{ "articles": mparticles, }, isSafe, ) @@ -163,7 +163,7 @@ func (c *WorkwxApp) SendMarkdownMessage( content string, isSafe bool, ) error { - return c.sendMessage(recipient, "markdown", map[string]interface{}{"content": content}, isSafe) + return c.sendMessage(recipient, "markdown", map[string]any{"content": content}, isSafe) } // SendTaskCardMessage 发送 任务卡片 消息 @@ -179,7 +179,7 @@ func (c *WorkwxApp) SendTaskCardMessage( return c.sendMessage( recipient, "taskcard", - map[string]interface{}{ + map[string]any{ "title": title, "description": description, "url": url, @@ -198,7 +198,7 @@ func (c *WorkwxApp) SendTemplateCardMessage( return c.sendMessage( recipient, "template_card", - map[string]interface{}{ + map[string]any{ "template_card": templateCard, }, isSafe, ) @@ -213,7 +213,7 @@ func (c *WorkwxApp) SendTemplateCardMessage( func (c *WorkwxApp) sendMessage( recipient *Recipient, msgtype string, - content map[string]interface{}, + content map[string]any, isSafe bool, ) error { sendRequestFunc := c.execMessageSend diff --git a/models.go b/models.go index 9fd28ac..79a72c7 100644 --- a/models.go +++ b/models.go @@ -8,7 +8,7 @@ import ( "time" ) -func marshalIntoJSONBody(x interface{}) ([]byte, error) { +func marshalIntoJSONBody(x any) ([]byte, error) { y, err := json.Marshal(x) if err != nil { // should never happen unless OOM or similar bad things @@ -101,7 +101,7 @@ type reqMessage struct { OpenKfID string Code string MsgType string - Content map[string]interface{} + Content map[string]any IsSafe bool } @@ -114,7 +114,7 @@ func (x reqMessage) intoBody() ([]byte, error) { safeInt = 1 } - obj := map[string]interface{}{ + obj := map[string]any{ "msgtype": x.MsgType, "agentid": x.AgentID, "safe": safeInt, diff --git a/models_test.go b/models_test.go index fbb2302..2cc77d3 100644 --- a/models_test.go +++ b/models_test.go @@ -70,7 +70,7 @@ func TestRespCommon(t *testing.T) { func TestReqMessage(t *testing.T) { c.Convey("构造 reqMessage", t, func() { - content := map[string]interface{}{"content": "test"} + content := map[string]any{"content": "test"} a := reqMessage{ AgentID: 233, MsgType: "text", @@ -87,7 +87,7 @@ func TestReqMessage(t *testing.T) { }) c.Convey("故意放一个不能 marshal 的 Content", func() { - a.Content = map[string]interface{}{ + a.Content = map[string]any{ "heh": make(chan struct{}), } @@ -121,11 +121,11 @@ func TestReqMessage(t *testing.T) { "text": {"content": "test"}, "safe": 1 }`) - var expected map[string]interface{} + var expected map[string]any err := json.Unmarshal(expectedPayload, &expected) c.So(err, c.ShouldBeNil) - var actual map[string]interface{} + var actual map[string]any err = json.Unmarshal(result, &actual) c.So(err, c.ShouldBeNil) @@ -154,11 +154,11 @@ func TestReqMessage(t *testing.T) { "text": {"content": "test"}, "safe": 0 }`) - var expected map[string]interface{} + var expected map[string]any err := json.Unmarshal(expectedPayload, &expected) c.So(err, c.ShouldBeNil) - var actual map[string]interface{} + var actual map[string]any err = json.Unmarshal(result, &actual) c.So(err, c.ShouldBeNil) diff --git a/webhook_client.go b/webhook_client.go index 880490b..c9f12b3 100644 --- a/webhook_client.go +++ b/webhook_client.go @@ -34,7 +34,7 @@ func (c *WebhookClient) Key() string { return c.key } -func (c *WebhookClient) composeQyapiURLWithKey(path string, req interface{}) (*url.URL, error) { +func (c *WebhookClient) composeQyapiURLWithKey(path string, req any) (*url.URL, error) { values := url.Values{} if valuer, ok := req.(urlValuer); ok { values = valuer.intoURLValues() @@ -55,7 +55,7 @@ func (c *WebhookClient) composeQyapiURLWithKey(path string, req interface{}) (*u return base, nil } -func (c *WebhookClient) executeQyapiJSONPost(path string, req interface{}, respObj interface{}) error { +func (c *WebhookClient) executeQyapiJSONPost(path string, req any, respObj any) error { url, err := c.composeQyapiURLWithKey(path, req) if err != nil { return err diff --git a/webhook_message.go b/webhook_message.go index c7f17e7..f7b41d8 100644 --- a/webhook_message.go +++ b/webhook_message.go @@ -20,7 +20,7 @@ func (c *WebhookClient) SendTextMessage( content string, mentions *Mentions, ) error { - params := map[string]interface{}{ + params := map[string]any{ "content": content, } @@ -44,7 +44,7 @@ func (c *WebhookClient) SendTextMessage( func (c *WebhookClient) SendMarkdownMessage( content string, ) error { - params := map[string]interface{}{ + params := map[string]any{ "content": content, } @@ -54,9 +54,9 @@ func (c *WebhookClient) SendMarkdownMessage( // sendMessage 发送消息底层接口 func (c *WebhookClient) sendMessage( msgtype string, - content map[string]interface{}, + content map[string]any, ) error { - req := map[string]interface{}{ + req := map[string]any{ "msgtype": msgtype, msgtype: content, } From 4e7479ad30bbf53132424c5c5875711161c7527c Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Fri, 6 Jan 2023 17:03:09 +0800 Subject: [PATCH 2/8] refactor: take executeQyapiFoo away from WorkwxApp otherwise we couldn't have their arguments parameterized See: https://github.com/golang/go/issues/49085 --- apis.md.go | 162 ++++++++++++++++++------------------ client.go | 7 +- internal/sdkcodegen/emit.go | 10 +-- 3 files changed, 90 insertions(+), 89 deletions(-) diff --git a/apis.md.go b/apis.md.go index ecc457a..224b0d3 100644 --- a/apis.md.go +++ b/apis.md.go @@ -5,7 +5,7 @@ package workwx // execGetAccessToken 获取access_token func (c *WorkwxApp) execGetAccessToken(req reqAccessToken) (respAccessToken, error) { var resp respAccessToken - err := c.executeQyapiGet("/cgi-bin/gettoken", req, &resp, false) + err := executeQyapiGet(c, "/cgi-bin/gettoken", req, &resp, false) if err != nil { return respAccessToken{}, err } @@ -19,7 +19,7 @@ func (c *WorkwxApp) execGetAccessToken(req reqAccessToken) (respAccessToken, err // execGetJSAPITicket 获取企业的jsapi_ticket func (c *WorkwxApp) execGetJSAPITicket(req reqJSAPITicket) (respJSAPITicket, error) { var resp respJSAPITicket - err := c.executeQyapiGet("/cgi-bin/get_jsapi_ticket", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/get_jsapi_ticket", req, &resp, true) if err != nil { return respJSAPITicket{}, err } @@ -33,7 +33,7 @@ func (c *WorkwxApp) execGetJSAPITicket(req reqJSAPITicket) (respJSAPITicket, err // execGetJSAPITicketAgentConfig 获取应用的jsapi_ticket func (c *WorkwxApp) execGetJSAPITicketAgentConfig(req reqJSAPITicketAgentConfig) (respJSAPITicket, error) { var resp respJSAPITicket - err := c.executeQyapiGet("/cgi-bin/ticket/get", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/ticket/get", req, &resp, true) if err != nil { return respJSAPITicket{}, err } @@ -47,7 +47,7 @@ func (c *WorkwxApp) execGetJSAPITicketAgentConfig(req reqJSAPITicketAgentConfig) // execJSCode2Session 临时登录凭证校验code2Session func (c *WorkwxApp) execJSCode2Session(req reqJSCode2Session) (respJSCode2Session, error) { var resp respJSCode2Session - err := c.executeQyapiGet("/cgi-bin/miniprogram/jscode2session", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/miniprogram/jscode2session", req, &resp, true) if err != nil { return respJSCode2Session{}, err } @@ -61,7 +61,7 @@ func (c *WorkwxApp) execJSCode2Session(req reqJSCode2Session) (respJSCode2Sessio // execAuthCode2UserInfo 获取访问用户身份 func (c *WorkwxApp) execAuthCode2UserInfo(req reqAuthCode2UserInfo) (respAuthCode2UserInfo, error) { var resp respAuthCode2UserInfo - err := c.executeQyapiGet("/cgi-bin/auth/getuserinfo", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/auth/getuserinfo", req, &resp, true) if err != nil { return respAuthCode2UserInfo{}, err } @@ -75,7 +75,7 @@ func (c *WorkwxApp) execAuthCode2UserInfo(req reqAuthCode2UserInfo) (respAuthCod // execUserGet 读取成员 func (c *WorkwxApp) execUserGet(req reqUserGet) (respUserGet, error) { var resp respUserGet - err := c.executeQyapiGet("/cgi-bin/user/get", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/user/get", req, &resp, true) if err != nil { return respUserGet{}, err } @@ -89,7 +89,7 @@ func (c *WorkwxApp) execUserGet(req reqUserGet) (respUserGet, error) { // execUserUpdate 更新成员 func (c *WorkwxApp) execUserUpdate(req reqUserUpdate) (respUserUpdate, error) { var resp respUserUpdate - err := c.executeQyapiJSONPost("/cgi-bin/user/update", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/user/update", req, &resp, true) if err != nil { return respUserUpdate{}, err } @@ -103,7 +103,7 @@ func (c *WorkwxApp) execUserUpdate(req reqUserUpdate) (respUserUpdate, error) { // execUserList 获取部门成员详情 func (c *WorkwxApp) execUserList(req reqUserList) (respUserList, error) { var resp respUserList - err := c.executeQyapiGet("/cgi-bin/user/list", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/user/list", req, &resp, true) if err != nil { return respUserList{}, err } @@ -117,7 +117,7 @@ func (c *WorkwxApp) execUserList(req reqUserList) (respUserList, error) { // execConvertUserIDToOpenID userid转openid func (c *WorkwxApp) execConvertUserIDToOpenID(req reqConvertUserIDToOpenID) (respConvertUserIDToOpenID, error) { var resp respConvertUserIDToOpenID - err := c.executeQyapiJSONPost("/cgi-bin/user/convert_to_openid", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/user/convert_to_openid", req, &resp, true) if err != nil { return respConvertUserIDToOpenID{}, err } @@ -131,7 +131,7 @@ func (c *WorkwxApp) execConvertUserIDToOpenID(req reqConvertUserIDToOpenID) (res // execConvertOpenIDToUserID openid转userid func (c *WorkwxApp) execConvertOpenIDToUserID(req reqConvertOpenIDToUserID) (respConvertOpenIDToUserID, error) { var resp respConvertOpenIDToUserID - err := c.executeQyapiJSONPost("/cgi-bin/user/convert_to_userid", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/user/convert_to_userid", req, &resp, true) if err != nil { return respConvertOpenIDToUserID{}, err } @@ -145,7 +145,7 @@ func (c *WorkwxApp) execConvertOpenIDToUserID(req reqConvertOpenIDToUserID) (res // execUserJoinQrcode 获取加入企业二维码 func (c *WorkwxApp) execUserJoinQrcode(req reqUserJoinQrcode) (respUserJoinQrcode, error) { var resp respUserJoinQrcode - err := c.executeQyapiGet("/cgi-bin/corp/get_join_qrcode", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/corp/get_join_qrcode", req, &resp, true) if err != nil { return respUserJoinQrcode{}, err } @@ -159,7 +159,7 @@ func (c *WorkwxApp) execUserJoinQrcode(req reqUserJoinQrcode) (respUserJoinQrcod // execUserIDByMobile 手机号获取userid func (c *WorkwxApp) execUserIDByMobile(req reqUserIDByMobile) (respUserIDByMobile, error) { var resp respUserIDByMobile - err := c.executeQyapiJSONPost("/cgi-bin/user/getuserid", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/user/getuserid", req, &resp, true) if err != nil { return respUserIDByMobile{}, err } @@ -173,7 +173,7 @@ func (c *WorkwxApp) execUserIDByMobile(req reqUserIDByMobile) (respUserIDByMobil // execUserIDByEmail 邮箱获取userid func (c *WorkwxApp) execUserIDByEmail(req reqUserIDByEmail) (respUserIDByEmail, error) { var resp respUserIDByEmail - err := c.executeQyapiJSONPost("/cgi-bin/user/get_userid_by_email", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/user/get_userid_by_email", req, &resp, true) if err != nil { return respUserIDByEmail{}, err } @@ -187,7 +187,7 @@ func (c *WorkwxApp) execUserIDByEmail(req reqUserIDByEmail) (respUserIDByEmail, // execDeptCreate 创建部门 func (c *WorkwxApp) execDeptCreate(req reqDeptCreate) (respDeptCreate, error) { var resp respDeptCreate - err := c.executeQyapiJSONPost("/cgi-bin/department/create", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/department/create", req, &resp, true) if err != nil { return respDeptCreate{}, err } @@ -201,7 +201,7 @@ func (c *WorkwxApp) execDeptCreate(req reqDeptCreate) (respDeptCreate, error) { // execDeptList 获取部门列表 func (c *WorkwxApp) execDeptList(req reqDeptList) (respDeptList, error) { var resp respDeptList - err := c.executeQyapiGet("/cgi-bin/department/list", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/department/list", req, &resp, true) if err != nil { return respDeptList{}, err } @@ -215,7 +215,7 @@ func (c *WorkwxApp) execDeptList(req reqDeptList) (respDeptList, error) { // execDeptSimpleList 获取子部门ID列表 func (c *WorkwxApp) execDeptSimpleList(req reqDeptSimpleList) (respDeptSimpleList, error) { var resp respDeptSimpleList - err := c.executeQyapiGet("/cgi-bin/department/simplelist", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/department/simplelist", req, &resp, true) if err != nil { return respDeptSimpleList{}, err } @@ -229,7 +229,7 @@ func (c *WorkwxApp) execDeptSimpleList(req reqDeptSimpleList) (respDeptSimpleLis // execUserInfoGet 获取访问用户身份 func (c *WorkwxApp) execUserInfoGet(req reqUserInfoGet) (respUserInfoGet, error) { var resp respUserInfoGet - err := c.executeQyapiGet("/cgi-bin/user/getuserinfo", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/user/getuserinfo", req, &resp, true) if err != nil { return respUserInfoGet{}, err } @@ -243,7 +243,7 @@ func (c *WorkwxApp) execUserInfoGet(req reqUserInfoGet) (respUserInfoGet, error) // execExternalContactList 获取客户列表 func (c *WorkwxApp) execExternalContactList(req reqExternalContactList) (respExternalContactList, error) { var resp respExternalContactList - err := c.executeQyapiGet("/cgi-bin/externalcontact/list", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/externalcontact/list", req, &resp, true) if err != nil { return respExternalContactList{}, err } @@ -257,7 +257,7 @@ func (c *WorkwxApp) execExternalContactList(req reqExternalContactList) (respExt // execExternalContactGet 获取客户详情 func (c *WorkwxApp) execExternalContactGet(req reqExternalContactGet) (respExternalContactGet, error) { var resp respExternalContactGet - err := c.executeQyapiGet("/cgi-bin/externalcontact/get", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/externalcontact/get", req, &resp, true) if err != nil { return respExternalContactGet{}, err } @@ -271,7 +271,7 @@ func (c *WorkwxApp) execExternalContactGet(req reqExternalContactGet) (respExter // execExternalContactBatchList 批量获取客户详情 func (c *WorkwxApp) execExternalContactBatchList(req reqExternalContactBatchList) (respExternalContactBatchList, error) { var resp respExternalContactBatchList - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/batch/get_by_user", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/batch/get_by_user", req, &resp, true) if err != nil { return respExternalContactBatchList{}, err } @@ -285,7 +285,7 @@ func (c *WorkwxApp) execExternalContactBatchList(req reqExternalContactBatchList // execExternalContactRemark 修改客户备注信息 func (c *WorkwxApp) execExternalContactRemark(req reqExternalContactRemark) (respExternalContactRemark, error) { var resp respExternalContactRemark - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/remark", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/remark", req, &resp, true) if err != nil { return respExternalContactRemark{}, err } @@ -299,7 +299,7 @@ func (c *WorkwxApp) execExternalContactRemark(req reqExternalContactRemark) (res // execExternalContactListCorpTags 获取企业标签库 func (c *WorkwxApp) execExternalContactListCorpTags(req reqExternalContactListCorpTags) (respExternalContactListCorpTags, error) { var resp respExternalContactListCorpTags - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/get_corp_tag_list", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/get_corp_tag_list", req, &resp, true) if err != nil { return respExternalContactListCorpTags{}, err } @@ -313,7 +313,7 @@ func (c *WorkwxApp) execExternalContactListCorpTags(req reqExternalContactListCo // execExternalContactAddCorpTag 添加企业客户标签 func (c *WorkwxApp) execExternalContactAddCorpTag(req reqExternalContactAddCorpTagGroup) (respExternalContactAddCorpTag, error) { var resp respExternalContactAddCorpTag - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/add_corp_tag", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/add_corp_tag", req, &resp, true) if err != nil { return respExternalContactAddCorpTag{}, err } @@ -327,7 +327,7 @@ func (c *WorkwxApp) execExternalContactAddCorpTag(req reqExternalContactAddCorpT // execExternalContactEditCorpTag 编辑企业客户标签 func (c *WorkwxApp) execExternalContactEditCorpTag(req reqExternalContactEditCorpTag) (respExternalContactEditCorpTag, error) { var resp respExternalContactEditCorpTag - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/edit_corp_tag", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/edit_corp_tag", req, &resp, true) if err != nil { return respExternalContactEditCorpTag{}, err } @@ -341,7 +341,7 @@ func (c *WorkwxApp) execExternalContactEditCorpTag(req reqExternalContactEditCor // execExternalContactDelCorpTag 删除企业客户标签 func (c *WorkwxApp) execExternalContactDelCorpTag(req reqExternalContactDelCorpTag) (respExternalContactDelCorpTag, error) { var resp respExternalContactDelCorpTag - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/del_corp_tag", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/del_corp_tag", req, &resp, true) if err != nil { return respExternalContactDelCorpTag{}, err } @@ -355,7 +355,7 @@ func (c *WorkwxApp) execExternalContactDelCorpTag(req reqExternalContactDelCorpT // execExternalContactMarkTag 标记客户企业标签 func (c *WorkwxApp) execExternalContactMarkTag(req reqExternalContactMarkTag) (respExternalContactMarkTag, error) { var resp respExternalContactMarkTag - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/mark_tag", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/mark_tag", req, &resp, true) if err != nil { return respExternalContactMarkTag{}, err } @@ -369,7 +369,7 @@ func (c *WorkwxApp) execExternalContactMarkTag(req reqExternalContactMarkTag) (r // execListUnassignedExternalContact 获取离职成员的客户列表 func (c *WorkwxApp) execListUnassignedExternalContact(req reqListUnassignedExternalContact) (respListUnassignedExternalContact, error) { var resp respListUnassignedExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/get_unassigned_list", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/get_unassigned_list", req, &resp, true) if err != nil { return respListUnassignedExternalContact{}, err } @@ -383,7 +383,7 @@ func (c *WorkwxApp) execListUnassignedExternalContact(req reqListUnassignedExter // execTransferExternalContact 分配成员的客户 func (c *WorkwxApp) execTransferExternalContact(req reqTransferExternalContact) (respTransferExternalContact, error) { var resp respTransferExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/transfer", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/transfer", req, &resp, true) if err != nil { return respTransferExternalContact{}, err } @@ -397,7 +397,7 @@ func (c *WorkwxApp) execTransferExternalContact(req reqTransferExternalContact) // execGetTransferExternalContactResult 查询客户接替结果 func (c *WorkwxApp) execGetTransferExternalContactResult(req reqGetTransferExternalContactResult) (respGetTransferExternalContactResult, error) { var resp respGetTransferExternalContactResult - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/get_transfer_result", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/get_transfer_result", req, &resp, true) if err != nil { return respGetTransferExternalContactResult{}, err } @@ -411,7 +411,7 @@ func (c *WorkwxApp) execGetTransferExternalContactResult(req reqGetTransferExter // execTransferGroupChatExternalContact 离职成员的群再分配 func (c *WorkwxApp) execTransferGroupChatExternalContact(req reqTransferGroupChatExternalContact) (respTransferGroupChatExternalContact, error) { var resp respTransferGroupChatExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/groupchat/transfer", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/groupchat/transfer", req, &resp, true) if err != nil { return respTransferGroupChatExternalContact{}, err } @@ -425,7 +425,7 @@ func (c *WorkwxApp) execTransferGroupChatExternalContact(req reqTransferGroupCha // execAppchatCreate 创建群聊会话 func (c *WorkwxApp) execAppchatCreate(req reqAppchatCreate) (respAppchatCreate, error) { var resp respAppchatCreate - err := c.executeQyapiJSONPost("/cgi-bin/appchat/create", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/appchat/create", req, &resp, true) if err != nil { return respAppchatCreate{}, err } @@ -439,7 +439,7 @@ func (c *WorkwxApp) execAppchatCreate(req reqAppchatCreate) (respAppchatCreate, // execAppchatUpdate 修改群聊会话 func (c *WorkwxApp) execAppchatUpdate(req reqAppchatUpdate) (respAppchatUpdate, error) { var resp respAppchatUpdate - err := c.executeQyapiJSONPost("/cgi-bin/appchat/update", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/appchat/update", req, &resp, true) if err != nil { return respAppchatUpdate{}, err } @@ -453,7 +453,7 @@ func (c *WorkwxApp) execAppchatUpdate(req reqAppchatUpdate) (respAppchatUpdate, // execAppchatGet 获取群聊会话 func (c *WorkwxApp) execAppchatGet(req reqAppchatGet) (respAppchatGet, error) { var resp respAppchatGet - err := c.executeQyapiGet("/cgi-bin/appchat/get", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/appchat/get", req, &resp, true) if err != nil { return respAppchatGet{}, err } @@ -467,7 +467,7 @@ func (c *WorkwxApp) execAppchatGet(req reqAppchatGet) (respAppchatGet, error) { // execMessageSend 发送应用消息 func (c *WorkwxApp) execMessageSend(req reqMessage) (respMessageSend, error) { var resp respMessageSend - err := c.executeQyapiJSONPost("/cgi-bin/message/send", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/message/send", req, &resp, true) if err != nil { return respMessageSend{}, err } @@ -481,7 +481,7 @@ func (c *WorkwxApp) execMessageSend(req reqMessage) (respMessageSend, error) { // execAppchatSend 应用推送消息 func (c *WorkwxApp) execAppchatSend(req reqMessage) (respMessageSend, error) { var resp respMessageSend - err := c.executeQyapiJSONPost("/cgi-bin/appchat/send", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/appchat/send", req, &resp, true) if err != nil { return respMessageSend{}, err } @@ -495,7 +495,7 @@ func (c *WorkwxApp) execAppchatSend(req reqMessage) (respMessageSend, error) { // execMediaUpload 上传临时素材 func (c *WorkwxApp) execMediaUpload(req reqMediaUpload) (respMediaUpload, error) { var resp respMediaUpload - err := c.executeQyapiMediaUpload("/cgi-bin/media/upload", req, &resp, true) + err := executeQyapiMediaUpload(c, "/cgi-bin/media/upload", req, &resp, true) if err != nil { return respMediaUpload{}, err } @@ -509,7 +509,7 @@ func (c *WorkwxApp) execMediaUpload(req reqMediaUpload) (respMediaUpload, error) // execMediaUploadImg 上传永久图片 func (c *WorkwxApp) execMediaUploadImg(req reqMediaUploadImg) (respMediaUploadImg, error) { var resp respMediaUploadImg - err := c.executeQyapiMediaUpload("/cgi-bin/media/uploadimg", req, &resp, true) + err := executeQyapiMediaUpload(c, "/cgi-bin/media/uploadimg", req, &resp, true) if err != nil { return respMediaUploadImg{}, err } @@ -523,7 +523,7 @@ func (c *WorkwxApp) execMediaUploadImg(req reqMediaUploadImg) (respMediaUploadIm // execOAGetTemplateDetail 获取审批模板详情 func (c *WorkwxApp) execOAGetTemplateDetail(req reqOAGetTemplateDetail) (respOAGetTemplateDetail, error) { var resp respOAGetTemplateDetail - err := c.executeQyapiJSONPost("/cgi-bin/oa/gettemplatedetail", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/oa/gettemplatedetail", req, &resp, true) if err != nil { return respOAGetTemplateDetail{}, err } @@ -537,7 +537,7 @@ func (c *WorkwxApp) execOAGetTemplateDetail(req reqOAGetTemplateDetail) (respOAG // execOAApplyEvent 提交审批申请 func (c *WorkwxApp) execOAApplyEvent(req reqOAApplyEvent) (respOAApplyEvent, error) { var resp respOAApplyEvent - err := c.executeQyapiJSONPost("/cgi-bin/oa/applyevent", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/oa/applyevent", req, &resp, true) if err != nil { return respOAApplyEvent{}, err } @@ -551,7 +551,7 @@ func (c *WorkwxApp) execOAApplyEvent(req reqOAApplyEvent) (respOAApplyEvent, err // execOAGetApprovalInfo 批量获取审批单号 func (c *WorkwxApp) execOAGetApprovalInfo(req reqOAGetApprovalInfo) (respOAGetApprovalInfo, error) { var resp respOAGetApprovalInfo - err := c.executeQyapiJSONPost("/cgi-bin/oa/getapprovalinfo", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/oa/getapprovalinfo", req, &resp, true) if err != nil { return respOAGetApprovalInfo{}, err } @@ -565,7 +565,7 @@ func (c *WorkwxApp) execOAGetApprovalInfo(req reqOAGetApprovalInfo) (respOAGetAp // execOAGetApprovalDetail 获取审批申请详情 func (c *WorkwxApp) execOAGetApprovalDetail(req reqOAGetApprovalDetail) (respOAGetApprovalDetail, error) { var resp respOAGetApprovalDetail - err := c.executeQyapiJSONPost("/cgi-bin/oa/getapprovaldetail", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/oa/getapprovaldetail", req, &resp, true) if err != nil { return respOAGetApprovalDetail{}, err } @@ -579,7 +579,7 @@ func (c *WorkwxApp) execOAGetApprovalDetail(req reqOAGetApprovalDetail) (respOAG // execOAGetCorpVacationConf 获取企业假期管理配置 func (c *WorkwxApp) execOAGetCorpVacationConf(req reqOAGetCorpVacationConf) (respOAGetCorpVacationConf, error) { var resp respOAGetCorpVacationConf - err := c.executeQyapiGet("/cgi-bin/oa/vacation/getcorpconf", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/oa/vacation/getcorpconf", req, &resp, true) if err != nil { return respOAGetCorpVacationConf{}, err } @@ -593,7 +593,7 @@ func (c *WorkwxApp) execOAGetCorpVacationConf(req reqOAGetCorpVacationConf) (res // execOAGetUserVacationQuota 获取成员假期余额 func (c *WorkwxApp) execOAGetUserVacationQuota(req reqOAGetUserVacationQuota) (respOAGetUserVacationQuota, error) { var resp respOAGetUserVacationQuota - err := c.executeQyapiJSONPost("/cgi-bin/oa/vacation/getuservacationquota", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/oa/vacation/getuservacationquota", req, &resp, true) if err != nil { return respOAGetUserVacationQuota{}, err } @@ -607,7 +607,7 @@ func (c *WorkwxApp) execOAGetUserVacationQuota(req reqOAGetUserVacationQuota) (r // execOASetOneUserVacationQuota 修改成员假期余额 func (c *WorkwxApp) execOASetOneUserVacationQuota(req reqOASetOneUserVacationQuota) (respOASetOneUserVacationQuota, error) { var resp respOASetOneUserVacationQuota - err := c.executeQyapiJSONPost("/cgi-bin/oa/vacation/setoneuserquota", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/oa/vacation/setoneuserquota", req, &resp, true) if err != nil { return respOASetOneUserVacationQuota{}, err } @@ -621,7 +621,7 @@ func (c *WorkwxApp) execOASetOneUserVacationQuota(req reqOASetOneUserVacationQuo // execMsgAuditListPermitUser 获取会话内容存档开启成员列表 func (c *WorkwxApp) execMsgAuditListPermitUser(req reqMsgAuditListPermitUser) (respMsgAuditListPermitUser, error) { var resp respMsgAuditListPermitUser - err := c.executeQyapiJSONPost("/cgi-bin/msgaudit/get_permit_user_list", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/msgaudit/get_permit_user_list", req, &resp, true) if err != nil { return respMsgAuditListPermitUser{}, err } @@ -635,7 +635,7 @@ func (c *WorkwxApp) execMsgAuditListPermitUser(req reqMsgAuditListPermitUser) (r // execMsgAuditCheckSingleAgree 获取会话同意情况(单聊) func (c *WorkwxApp) execMsgAuditCheckSingleAgree(req reqMsgAuditCheckSingleAgree) (respMsgAuditCheckSingleAgree, error) { var resp respMsgAuditCheckSingleAgree - err := c.executeQyapiJSONPost("/cgi-bin/msgaudit/check_single_agree", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/msgaudit/check_single_agree", req, &resp, true) if err != nil { return respMsgAuditCheckSingleAgree{}, err } @@ -649,7 +649,7 @@ func (c *WorkwxApp) execMsgAuditCheckSingleAgree(req reqMsgAuditCheckSingleAgree // execMsgAuditCheckRoomAgree 获取会话同意情况(群聊) func (c *WorkwxApp) execMsgAuditCheckRoomAgree(req reqMsgAuditCheckRoomAgree) (respMsgAuditCheckRoomAgree, error) { var resp respMsgAuditCheckRoomAgree - err := c.executeQyapiJSONPost("/cgi-bin/msgaudit/check_room_agree", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/msgaudit/check_room_agree", req, &resp, true) if err != nil { return respMsgAuditCheckRoomAgree{}, err } @@ -663,7 +663,7 @@ func (c *WorkwxApp) execMsgAuditCheckRoomAgree(req reqMsgAuditCheckRoomAgree) (r // execMsgAuditGetGroupChat 获取会话内容存档内部群信息 func (c *WorkwxApp) execMsgAuditGetGroupChat(req reqMsgAuditGetGroupChat) (respMsgAuditGetGroupChat, error) { var resp respMsgAuditGetGroupChat - err := c.executeQyapiJSONPost("/cgi-bin/msgaudit/groupchat/get", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/msgaudit/groupchat/get", req, &resp, true) if err != nil { return respMsgAuditGetGroupChat{}, err } @@ -677,7 +677,7 @@ func (c *WorkwxApp) execMsgAuditGetGroupChat(req reqMsgAuditGetGroupChat) (respM // execListFollowUserExternalContact 获取配置了客户联系功能的成员列表 func (c *WorkwxApp) execListFollowUserExternalContact(req reqListFollowUserExternalContact) (respListFollowUserExternalContact, error) { var resp respListFollowUserExternalContact - err := c.executeQyapiGet("/cgi-bin/externalcontact/get_follow_user_list", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/externalcontact/get_follow_user_list", req, &resp, true) if err != nil { return respListFollowUserExternalContact{}, err } @@ -691,7 +691,7 @@ func (c *WorkwxApp) execListFollowUserExternalContact(req reqListFollowUserExter // execAddContactExternalContact 配置客户联系「联系我」方式 func (c *WorkwxApp) execAddContactExternalContact(req reqAddContactExternalContact) (respAddContactExternalContact, error) { var resp respAddContactExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/add_contact_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/add_contact_way", req, &resp, true) if err != nil { return respAddContactExternalContact{}, err } @@ -705,7 +705,7 @@ func (c *WorkwxApp) execAddContactExternalContact(req reqAddContactExternalConta // execGetContactWayExternalContact 获取企业已配置的「联系我」方式 func (c *WorkwxApp) execGetContactWayExternalContact(req reqGetContactWayExternalContact) (respGetContactWayExternalContact, error) { var resp respGetContactWayExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/get_contact_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/get_contact_way", req, &resp, true) if err != nil { return respGetContactWayExternalContact{}, err } @@ -719,7 +719,7 @@ func (c *WorkwxApp) execGetContactWayExternalContact(req reqGetContactWayExterna // execListContactWayChatExternalContact 获取企业已配置的「联系我」列表 func (c *WorkwxApp) execListContactWayChatExternalContact(req reqListContactWayExternalContact) (respListContactWayChatExternalContact, error) { var resp respListContactWayChatExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/list_contact_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/list_contact_way", req, &resp, true) if err != nil { return respListContactWayChatExternalContact{}, err } @@ -733,7 +733,7 @@ func (c *WorkwxApp) execListContactWayChatExternalContact(req reqListContactWayE // execUpdateContactWayExternalContact 更新企业已配置的「联系我」成员配置 func (c *WorkwxApp) execUpdateContactWayExternalContact(req reqUpdateContactWayExternalContact) (respUpdateContactWayExternalContact, error) { var resp respUpdateContactWayExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/update_contact_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/update_contact_way", req, &resp, true) if err != nil { return respUpdateContactWayExternalContact{}, err } @@ -747,7 +747,7 @@ func (c *WorkwxApp) execUpdateContactWayExternalContact(req reqUpdateContactWayE // execDelContactWayExternalContact 删除企业已配置的「联系我」方式 func (c *WorkwxApp) execDelContactWayExternalContact(req reqDelContactWayExternalContact) (respDelContactWayExternalContact, error) { var resp respDelContactWayExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/del_contact_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/del_contact_way", req, &resp, true) if err != nil { return respDelContactWayExternalContact{}, err } @@ -761,7 +761,7 @@ func (c *WorkwxApp) execDelContactWayExternalContact(req reqDelContactWayExterna // execCloseTempChatExternalContact 结束临时会话 func (c *WorkwxApp) execCloseTempChatExternalContact(req reqCloseTempChatExternalContact) (respCloseTempChatExternalContact, error) { var resp respCloseTempChatExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/close_temp_chat", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/close_temp_chat", req, &resp, true) if err != nil { return respCloseTempChatExternalContact{}, err } @@ -775,7 +775,7 @@ func (c *WorkwxApp) execCloseTempChatExternalContact(req reqCloseTempChatExterna // execAddGroupChatJoinWayExternalContact 配置客户群「加入群聊」方式 func (c *WorkwxApp) execAddGroupChatJoinWayExternalContact(req reqAddGroupChatJoinWayExternalContact) (respAddGroupChatJoinWayExternalContact, error) { var resp respAddGroupChatJoinWayExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/groupchat/add_join_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/groupchat/add_join_way", req, &resp, true) if err != nil { return respAddGroupChatJoinWayExternalContact{}, err } @@ -789,7 +789,7 @@ func (c *WorkwxApp) execAddGroupChatJoinWayExternalContact(req reqAddGroupChatJo // execGetGroupChatJoinWayExternalContact 获取企业已配置的客户群「加入群聊」方式 func (c *WorkwxApp) execGetGroupChatJoinWayExternalContact(req reqGetGroupChatJoinWayExternalContact) (respGetGroupChatJoinWayExternalContact, error) { var resp respGetGroupChatJoinWayExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/groupchat/get_join_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/groupchat/get_join_way", req, &resp, true) if err != nil { return respGetGroupChatJoinWayExternalContact{}, err } @@ -803,7 +803,7 @@ func (c *WorkwxApp) execGetGroupChatJoinWayExternalContact(req reqGetGroupChatJo // execUpdateGroupChatJoinWayExternalContact 更新企业已配置的客户群「加入群聊」方式 func (c *WorkwxApp) execUpdateGroupChatJoinWayExternalContact(req reqUpdateGroupChatJoinWayExternalContact) (respUpdateGroupChatJoinWayExternalContact, error) { var resp respUpdateGroupChatJoinWayExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/groupchat/update_join_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/groupchat/update_join_way", req, &resp, true) if err != nil { return respUpdateGroupChatJoinWayExternalContact{}, err } @@ -817,7 +817,7 @@ func (c *WorkwxApp) execUpdateGroupChatJoinWayExternalContact(req reqUpdateGroup // execDelGroupChatJoinWayExternalContact 删除企业已配置的客户群「加入群聊」方式 func (c *WorkwxApp) execDelGroupChatJoinWayExternalContact(req reqDelGroupChatJoinWayExternalContact) (respDelGroupChatJoinWayExternalContact, error) { var resp respDelGroupChatJoinWayExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/groupchat/del_join_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/groupchat/del_join_way", req, &resp, true) if err != nil { return respDelGroupChatJoinWayExternalContact{}, err } @@ -831,7 +831,7 @@ func (c *WorkwxApp) execDelGroupChatJoinWayExternalContact(req reqDelGroupChatJo // execGroupChatListGet 获取客户群列表 func (c *WorkwxApp) execGroupChatListGet(req reqGroupChatList) (respGroupChatList, error) { var resp respGroupChatList - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/groupchat/list", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/groupchat/list", req, &resp, true) if err != nil { return respGroupChatList{}, err } @@ -845,7 +845,7 @@ func (c *WorkwxApp) execGroupChatListGet(req reqGroupChatList) (respGroupChatLis // execGroupChatInfoGet 获取客户群详细 func (c *WorkwxApp) execGroupChatInfoGet(req reqGroupChatInfo) (respGroupChatInfo, error) { var resp respGroupChatInfo - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/groupchat/get", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/groupchat/get", req, &resp, true) if err != nil { return respGroupChatInfo{}, err } @@ -859,7 +859,7 @@ func (c *WorkwxApp) execGroupChatInfoGet(req reqGroupChatInfo) (respGroupChatInf // execConvertOpenGIDToChatID 客户群opengid转换 func (c *WorkwxApp) execConvertOpenGIDToChatID(req reqConvertOpenGIDToChatID) (respConvertOpenGIDToChatID, error) { var resp respConvertOpenGIDToChatID - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/opengid_to_chatid", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/opengid_to_chatid", req, &resp, true) if err != nil { return respConvertOpenGIDToChatID{}, err } @@ -873,7 +873,7 @@ func (c *WorkwxApp) execConvertOpenGIDToChatID(req reqConvertOpenGIDToChatID) (r // execTransferCustomer 在职继承 分配在职成员的客户 func (c *WorkwxApp) execTransferCustomer(req reqTransferCustomer) (respTransferCustomer, error) { var resp respTransferCustomer - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/transfer_customer", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/transfer_customer", req, &resp, true) if err != nil { return respTransferCustomer{}, err } @@ -887,7 +887,7 @@ func (c *WorkwxApp) execTransferCustomer(req reqTransferCustomer) (respTransferC // execGetTransferCustomerResult 在职继承 查询客户接替状态 func (c *WorkwxApp) execGetTransferCustomerResult(req reqGetTransferCustomerResult) (respGetTransferCustomerResult, error) { var resp respGetTransferCustomerResult - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/transfer_result", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/transfer_result", req, &resp, true) if err != nil { return respGetTransferCustomerResult{}, err } @@ -901,7 +901,7 @@ func (c *WorkwxApp) execGetTransferCustomerResult(req reqGetTransferCustomerResu // execTransferResignedCustomer 离职继承 分配离职成员的客户 func (c *WorkwxApp) execTransferResignedCustomer(req reqTransferCustomer) (respTransferCustomer, error) { var resp respTransferCustomer - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/resigned/transfer_customer", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/resigned/transfer_customer", req, &resp, true) if err != nil { return respTransferCustomer{}, err } @@ -915,7 +915,7 @@ func (c *WorkwxApp) execTransferResignedCustomer(req reqTransferCustomer) (respT // execGetTransferResignedCustomerResult 离职继承 查询客户接替状态 func (c *WorkwxApp) execGetTransferResignedCustomerResult(req reqGetTransferCustomerResult) (respGetTransferCustomerResult, error) { var resp respGetTransferCustomerResult - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/resigned/transfer_result", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/resigned/transfer_result", req, &resp, true) if err != nil { return respGetTransferCustomerResult{}, err } @@ -929,7 +929,7 @@ func (c *WorkwxApp) execGetTransferResignedCustomerResult(req reqGetTransferCust // execAddMsgTemplate 创建企业群发 func (c *WorkwxApp) execAddMsgTemplate(req reqAddMsgTemplateExternalContact) (respAddMsgTemplateExternalContact, error) { var resp respAddMsgTemplateExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/add_msg_template", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/add_msg_template", req, &resp, true) if err != nil { return respAddMsgTemplateExternalContact{}, err } @@ -943,7 +943,7 @@ func (c *WorkwxApp) execAddMsgTemplate(req reqAddMsgTemplateExternalContact) (re // execSendWelcomeMsg 发送新客户欢迎语 func (c *WorkwxApp) execSendWelcomeMsg(req reqSendWelcomeMsgExternalContact) (respSendWelcomeMsgExternalContact, error) { var resp respSendWelcomeMsgExternalContact - err := c.executeQyapiJSONPost("/cgi-bin/externalcontact/send_welcome_msg", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/externalcontact/send_welcome_msg", req, &resp, true) if err != nil { return respSendWelcomeMsgExternalContact{}, err } @@ -957,7 +957,7 @@ func (c *WorkwxApp) execSendWelcomeMsg(req reqSendWelcomeMsgExternalContact) (re // execKfAccountCreate 添加客服账号 func (c *WorkwxApp) execKfAccountCreate(req reqKfAccountCreate) (respKfAccountCreate, error) { var resp respKfAccountCreate - err := c.executeQyapiJSONPost("/cgi-bin/kf/account/add", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/account/add", req, &resp, true) if err != nil { return respKfAccountCreate{}, err } @@ -971,7 +971,7 @@ func (c *WorkwxApp) execKfAccountCreate(req reqKfAccountCreate) (respKfAccountCr // execKfAccountUpdate 修改客服账号 func (c *WorkwxApp) execKfAccountUpdate(req reqKfAccountUpdate) (respKfAccountUpdate, error) { var resp respKfAccountUpdate - err := c.executeQyapiJSONPost("/cgi-bin/kf/account/update", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/account/update", req, &resp, true) if err != nil { return respKfAccountUpdate{}, err } @@ -985,7 +985,7 @@ func (c *WorkwxApp) execKfAccountUpdate(req reqKfAccountUpdate) (respKfAccountUp // execKfAccountDelete 删除客服账号 func (c *WorkwxApp) execKfAccountDelete(req reqKfAccountDelete) (respKfAccountDelete, error) { var resp respKfAccountDelete - err := c.executeQyapiJSONPost("/cgi-bin/kf/account/del", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/account/del", req, &resp, true) if err != nil { return respKfAccountDelete{}, err } @@ -999,7 +999,7 @@ func (c *WorkwxApp) execKfAccountDelete(req reqKfAccountDelete) (respKfAccountDe // execKfAccountList 获取客服账号列表 func (c *WorkwxApp) execKfAccountList(req reqKfAccountList) (respKfAccountList, error) { var resp respKfAccountList - err := c.executeQyapiGet("/cgi-bin/kf/account/list", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/kf/account/list", req, &resp, true) if err != nil { return respKfAccountList{}, err } @@ -1013,7 +1013,7 @@ func (c *WorkwxApp) execKfAccountList(req reqKfAccountList) (respKfAccountList, // execAddKfContact 获取客服账号链接 func (c *WorkwxApp) execAddKfContact(req reqAddKfContact) (respAddKfContact, error) { var resp respAddKfContact - err := c.executeQyapiJSONPost("/cgi-bin/kf/add_contact_way", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/add_contact_way", req, &resp, true) if err != nil { return respAddKfContact{}, err } @@ -1027,7 +1027,7 @@ func (c *WorkwxApp) execAddKfContact(req reqAddKfContact) (respAddKfContact, err // execKfServicerCreate 添加接待人员 func (c *WorkwxApp) execKfServicerCreate(req reqKfServicerCreate) (respKfServicerCreate, error) { var resp respKfServicerCreate - err := c.executeQyapiJSONPost("/cgi-bin/kf/servicer/add", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/servicer/add", req, &resp, true) if err != nil { return respKfServicerCreate{}, err } @@ -1041,7 +1041,7 @@ func (c *WorkwxApp) execKfServicerCreate(req reqKfServicerCreate) (respKfService // execKfServicerDelete 删除接待人员 func (c *WorkwxApp) execKfServicerDelete(req reqKfServicerDelete) (respKfServicerDelete, error) { var resp respKfServicerDelete - err := c.executeQyapiJSONPost("/cgi-bin/kf/servicer/del", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/servicer/del", req, &resp, true) if err != nil { return respKfServicerDelete{}, err } @@ -1055,7 +1055,7 @@ func (c *WorkwxApp) execKfServicerDelete(req reqKfServicerDelete) (respKfService // execKfServicerList 获取接待人员列表 func (c *WorkwxApp) execKfServicerList(req reqKfServicerList) (respKfServicerList, error) { var resp respKfServicerList - err := c.executeQyapiGet("/cgi-bin/kf/servicer/list", req, &resp, true) + err := executeQyapiGet(c, "/cgi-bin/kf/servicer/list", req, &resp, true) if err != nil { return respKfServicerList{}, err } @@ -1069,7 +1069,7 @@ func (c *WorkwxApp) execKfServicerList(req reqKfServicerList) (respKfServicerLis // execKfServiceStateGet 获取会话状态 func (c *WorkwxApp) execKfServiceStateGet(req reqKfServiceStateGet) (respKfServiceStateGet, error) { var resp respKfServiceStateGet - err := c.executeQyapiJSONPost("/cgi-bin/kf/service_state/get", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/service_state/get", req, &resp, true) if err != nil { return respKfServiceStateGet{}, err } @@ -1083,7 +1083,7 @@ func (c *WorkwxApp) execKfServiceStateGet(req reqKfServiceStateGet) (respKfServi // execKfServiceStateTrans 变更会话状态 func (c *WorkwxApp) execKfServiceStateTrans(req reqKfServiceStateTrans) (respKfServiceStateTrans, error) { var resp respKfServiceStateTrans - err := c.executeQyapiJSONPost("/cgi-bin/kf/service_state/trans", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/service_state/trans", req, &resp, true) if err != nil { return respKfServiceStateTrans{}, err } @@ -1097,7 +1097,7 @@ func (c *WorkwxApp) execKfServiceStateTrans(req reqKfServiceStateTrans) (respKfS // execKfSyncMsg 读取消息 func (c *WorkwxApp) execKfSyncMsg(req reqKfSyncMsg) (respKfSyncMsg, error) { var resp respKfSyncMsg - err := c.executeQyapiJSONPost("/cgi-bin/kf/sync_msg", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/sync_msg", req, &resp, true) if err != nil { return respKfSyncMsg{}, err } @@ -1111,7 +1111,7 @@ func (c *WorkwxApp) execKfSyncMsg(req reqKfSyncMsg) (respKfSyncMsg, error) { // execKfSend 发送消息 func (c *WorkwxApp) execKfSend(req reqMessage) (respMessageSend, error) { var resp respMessageSend - err := c.executeQyapiJSONPost("/cgi-bin/kf/send_msg", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/send_msg", req, &resp, true) if err != nil { return respMessageSend{}, err } @@ -1125,7 +1125,7 @@ func (c *WorkwxApp) execKfSend(req reqMessage) (respMessageSend, error) { // execKfOnEventSend 发送欢迎语等事件响应消息 func (c *WorkwxApp) execKfOnEventSend(req reqMessage) (respMessageSend, error) { var resp respMessageSend - err := c.executeQyapiJSONPost("/cgi-bin/kf/send_msg_on_event", req, &resp, true) + err := executeQyapiJSONPost(c, "/cgi-bin/kf/send_msg_on_event", req, &resp, true) if err != nil { return respMessageSend{}, err } diff --git a/client.go b/client.go index 300695a..42265d8 100644 --- a/client.go +++ b/client.go @@ -103,7 +103,7 @@ func (c *WorkwxApp) composeQyapiURLWithToken(path string, req any, withAccessTok return url, nil } -func (c *WorkwxApp) executeQyapiGet(path string, req urlValuer, respObj any, withAccessToken bool) error { +func executeQyapiGet(c *WorkwxApp, path string, req urlValuer, respObj any, withAccessToken bool) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) if err != nil { return err @@ -125,7 +125,7 @@ func (c *WorkwxApp) executeQyapiGet(path string, req urlValuer, respObj any, wit return nil } -func (c *WorkwxApp) executeQyapiJSONPost(path string, req bodyer, respObj any, withAccessToken bool) error { +func executeQyapiJSONPost(c *WorkwxApp, path string, req bodyer, respObj any, withAccessToken bool) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) if err != nil { return err @@ -152,7 +152,8 @@ func (c *WorkwxApp) executeQyapiJSONPost(path string, req bodyer, respObj any, w return nil } -func (c *WorkwxApp) executeQyapiMediaUpload( +func executeQyapiMediaUpload( + c *WorkwxApp, path string, req mediaUploader, respObj any, diff --git a/internal/sdkcodegen/emit.go b/internal/sdkcodegen/emit.go index 183021c..29971cc 100644 --- a/internal/sdkcodegen/emit.go +++ b/internal/sdkcodegen/emit.go @@ -158,14 +158,14 @@ func (e *goEmitter) emitDoc(ident string, doc string) error { func (e *goEmitter) emitAPICall(x *apiCall) error { ident := x.ident - var execMethodName string + var execFnName string switch x.method { case apiMethodGET: - execMethodName = "executeQyapiGet" + execFnName = "executeQyapiGet" case apiMethodPOSTJSON: - execMethodName = "executeQyapiJSONPost" + execFnName = "executeQyapiJSONPost" case apiMethodPOSTMedia: - execMethodName = "executeQyapiMediaUpload" + execFnName = "executeQyapiMediaUpload" default: panic("unimplemented") } @@ -174,7 +174,7 @@ func (e *goEmitter) emitAPICall(x *apiCall) error { e.emitDoc(ident, x.doc) e.e("func (c *WorkwxApp) %s(req %s) (%s, error) {\n", ident, x.reqType, x.respType) e.e("var resp %s\n", x.respType) - e.e("err := c.%s(\"%s\", req, &resp, %v)\n", execMethodName, x.httpURI, x.needsAccessToken) + e.e("err := %s(c, \"%s\", req, &resp, %v)\n", execFnName, x.httpURI, x.needsAccessToken) e.e("if err != nil {\n") // TODO: error_chain e.e("return %s{}, err\n", x.respType) From f6a3ebb3ecda1fada2d054038110534b3e92f1ac Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Fri, 6 Jan 2023 17:09:44 +0800 Subject: [PATCH 3/8] refactor: move TryIntoErr handling into common code --- client.go | 20 ++++++++++++++++---- traits.go | 4 ++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index 42265d8..96d99a6 100644 --- a/client.go +++ b/client.go @@ -103,7 +103,7 @@ func (c *WorkwxApp) composeQyapiURLWithToken(path string, req any, withAccessTok return url, nil } -func executeQyapiGet(c *WorkwxApp, path string, req urlValuer, respObj any, withAccessToken bool) error { +func executeQyapiGet[U tryIntoErr](c *WorkwxApp, path string, req urlValuer, respObj U, withAccessToken bool) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) if err != nil { return err @@ -122,10 +122,14 @@ func executeQyapiGet(c *WorkwxApp, path string, req urlValuer, respObj any, with return makeRespUnmarshalErr(err) } + if bizErr := respObj.TryIntoErr(); bizErr != nil { + return bizErr + } + return nil } -func executeQyapiJSONPost(c *WorkwxApp, path string, req bodyer, respObj any, withAccessToken bool) error { +func executeQyapiJSONPost[U tryIntoErr](c *WorkwxApp, path string, req bodyer, respObj U, withAccessToken bool) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) if err != nil { return err @@ -149,14 +153,18 @@ func executeQyapiJSONPost(c *WorkwxApp, path string, req bodyer, respObj any, wi return makeRespUnmarshalErr(err) } + if bizErr := respObj.TryIntoErr(); bizErr != nil { + return bizErr + } + return nil } -func executeQyapiMediaUpload( +func executeQyapiMediaUpload[U tryIntoErr]( c *WorkwxApp, path string, req mediaUploader, - respObj any, + respObj U, withAccessToken bool, ) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) @@ -193,5 +201,9 @@ func executeQyapiMediaUpload( return makeRespUnmarshalErr(err) } + if bizErr := respObj.TryIntoErr(); bizErr != nil { + return bizErr + } + return nil } diff --git a/traits.go b/traits.go index ae5b6b4..d666f15 100644 --- a/traits.go +++ b/traits.go @@ -18,3 +18,7 @@ type bodyer interface { type mediaUploader interface { getMedia() *Media } + +type tryIntoErr interface { + TryIntoErr() error +} From 1b0509f9102b8e6b0e8b470b7624cb3ba7fb0995 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Fri, 6 Jan 2023 17:10:35 +0800 Subject: [PATCH 4/8] style: break long signature lines --- client.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 96d99a6..7e156b8 100644 --- a/client.go +++ b/client.go @@ -103,7 +103,13 @@ func (c *WorkwxApp) composeQyapiURLWithToken(path string, req any, withAccessTok return url, nil } -func executeQyapiGet[U tryIntoErr](c *WorkwxApp, path string, req urlValuer, respObj U, withAccessToken bool) error { +func executeQyapiGet[U tryIntoErr]( + c *WorkwxApp, + path string, + req urlValuer, + respObj U, + withAccessToken bool, +) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) if err != nil { return err @@ -129,7 +135,13 @@ func executeQyapiGet[U tryIntoErr](c *WorkwxApp, path string, req urlValuer, res return nil } -func executeQyapiJSONPost[U tryIntoErr](c *WorkwxApp, path string, req bodyer, respObj U, withAccessToken bool) error { +func executeQyapiJSONPost[U tryIntoErr]( + c *WorkwxApp, + path string, + req bodyer, + respObj U, + withAccessToken bool, +) error { url, err := c.composeQyapiURLWithToken(path, req, withAccessToken) if err != nil { return err From c00b8dcb17edbc0dd0939d1cf7f87ef732a0b22c Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Fri, 6 Jan 2023 17:11:32 +0800 Subject: [PATCH 5/8] refactor: parameterize the executor functions' request types too --- client.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client.go b/client.go index 7e156b8..d10253f 100644 --- a/client.go +++ b/client.go @@ -103,10 +103,10 @@ func (c *WorkwxApp) composeQyapiURLWithToken(path string, req any, withAccessTok return url, nil } -func executeQyapiGet[U tryIntoErr]( +func executeQyapiGet[T urlValuer, U tryIntoErr]( c *WorkwxApp, path string, - req urlValuer, + req T, respObj U, withAccessToken bool, ) error { @@ -135,10 +135,10 @@ func executeQyapiGet[U tryIntoErr]( return nil } -func executeQyapiJSONPost[U tryIntoErr]( +func executeQyapiJSONPost[T bodyer, U tryIntoErr]( c *WorkwxApp, path string, - req bodyer, + req T, respObj U, withAccessToken bool, ) error { @@ -172,10 +172,10 @@ func executeQyapiJSONPost[U tryIntoErr]( return nil } -func executeQyapiMediaUpload[U tryIntoErr]( +func executeQyapiMediaUpload[T mediaUploader, U tryIntoErr]( c *WorkwxApp, path string, - req mediaUploader, + req T, respObj U, withAccessToken bool, ) error { From 0a3f50b041233110f6de7a9043b8a62fbbb3aeb6 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Fri, 6 Jan 2023 17:13:59 +0800 Subject: [PATCH 6/8] refactor: use new-style go:build comments throughout --- examples/callback-demo/main.go | 2 +- internal/errcodegen/code_names.go | 2 +- internal/errcodegen/emit.go | 1 - internal/errcodegen/main.go | 1 - internal/sdkcodegen/analyze.go | 2 +- internal/sdkcodegen/ast.go | 2 +- internal/sdkcodegen/emit.go | 2 +- internal/sdkcodegen/hir.go | 2 +- internal/sdkcodegen/lineending.go | 2 +- internal/sdkcodegen/main.go | 2 +- internal/sdkcodegen/parse.go | 10 ++++++---- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/callback-demo/main.go b/examples/callback-demo/main.go index 0bd24d5..defd880 100644 --- a/examples/callback-demo/main.go +++ b/examples/callback-demo/main.go @@ -1,4 +1,4 @@ -// +build examples +//go:build examples package main diff --git a/internal/errcodegen/code_names.go b/internal/errcodegen/code_names.go index b66e7ba..9d1a273 100644 --- a/internal/errcodegen/code_names.go +++ b/internal/errcodegen/code_names.go @@ -1,4 +1,4 @@ -//+build sdkcodegen +//go:build sdkcodegen package main diff --git a/internal/errcodegen/emit.go b/internal/errcodegen/emit.go index 7fb7d09..c24a1b9 100644 --- a/internal/errcodegen/emit.go +++ b/internal/errcodegen/emit.go @@ -1,5 +1,4 @@ //go:build sdkcodegen -// +build sdkcodegen package main diff --git a/internal/errcodegen/main.go b/internal/errcodegen/main.go index 34447d7..ed60bc9 100644 --- a/internal/errcodegen/main.go +++ b/internal/errcodegen/main.go @@ -1,5 +1,4 @@ //go:build sdkcodegen -// +build sdkcodegen package main diff --git a/internal/sdkcodegen/analyze.go b/internal/sdkcodegen/analyze.go index c171b59..d2899ad 100644 --- a/internal/sdkcodegen/analyze.go +++ b/internal/sdkcodegen/analyze.go @@ -1,4 +1,4 @@ -//+build sdkcodegen +//go:build sdkcodegen package main diff --git a/internal/sdkcodegen/ast.go b/internal/sdkcodegen/ast.go index 9a3230b..3eaf550 100644 --- a/internal/sdkcodegen/ast.go +++ b/internal/sdkcodegen/ast.go @@ -1,4 +1,4 @@ -//+build sdkcodegen +//go:build sdkcodegen package main diff --git a/internal/sdkcodegen/emit.go b/internal/sdkcodegen/emit.go index 29971cc..7cfd9f3 100644 --- a/internal/sdkcodegen/emit.go +++ b/internal/sdkcodegen/emit.go @@ -1,4 +1,4 @@ -//+build sdkcodegen +//go:build sdkcodegen package main diff --git a/internal/sdkcodegen/hir.go b/internal/sdkcodegen/hir.go index 4419f80..bc324ad 100644 --- a/internal/sdkcodegen/hir.go +++ b/internal/sdkcodegen/hir.go @@ -1,4 +1,4 @@ -//+build sdkcodegen +//go:build sdkcodegen package main diff --git a/internal/sdkcodegen/lineending.go b/internal/sdkcodegen/lineending.go index f47ceba..f4d6706 100644 --- a/internal/sdkcodegen/lineending.go +++ b/internal/sdkcodegen/lineending.go @@ -1,4 +1,4 @@ -//+build sdkcodegen +//go:build sdkcodegen package main diff --git a/internal/sdkcodegen/main.go b/internal/sdkcodegen/main.go index 92af179..c7aeb64 100644 --- a/internal/sdkcodegen/main.go +++ b/internal/sdkcodegen/main.go @@ -1,4 +1,4 @@ -//+build sdkcodegen +//go:build sdkcodegen package main diff --git a/internal/sdkcodegen/parse.go b/internal/sdkcodegen/parse.go index f1bc872..762bf83 100644 --- a/internal/sdkcodegen/parse.go +++ b/internal/sdkcodegen/parse.go @@ -1,4 +1,4 @@ -//+build sdkcodegen +//go:build sdkcodegen package main @@ -45,9 +45,11 @@ func parseDocument(content []byte) *mdTocNode { // ``` // Document(Content: []) // |- H1(Content: [Text]) -// |- H2(Content: [Text Code Text]) -// |- H3(Content: [Table]) -// |- H3(Content: [Table]) +// +// |- H2(Content: [Text Code Text]) +// |- H3(Content: [Table]) +// |- H3(Content: [Table]) +// // ``` func reshapeMarkdownAST(root *blackfriday.Node) *mdTocNode { stack := []mdNode{ From 93b5b531d04af2d61448b6cc4a28c618e4eae568 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Fri, 6 Jan 2023 17:15:54 +0800 Subject: [PATCH 7/8] refactor: remove now duplicate biz error handling from generated API calls --- apis.md.go | 243 ------------------------------------ internal/sdkcodegen/emit.go | 3 - 2 files changed, 246 deletions(-) diff --git a/apis.md.go b/apis.md.go index 224b0d3..941f6ce 100644 --- a/apis.md.go +++ b/apis.md.go @@ -9,9 +9,6 @@ func (c *WorkwxApp) execGetAccessToken(req reqAccessToken) (respAccessToken, err if err != nil { return respAccessToken{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respAccessToken{}, bizErr - } return resp, nil } @@ -23,9 +20,6 @@ func (c *WorkwxApp) execGetJSAPITicket(req reqJSAPITicket) (respJSAPITicket, err if err != nil { return respJSAPITicket{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respJSAPITicket{}, bizErr - } return resp, nil } @@ -37,9 +31,6 @@ func (c *WorkwxApp) execGetJSAPITicketAgentConfig(req reqJSAPITicketAgentConfig) if err != nil { return respJSAPITicket{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respJSAPITicket{}, bizErr - } return resp, nil } @@ -51,9 +42,6 @@ func (c *WorkwxApp) execJSCode2Session(req reqJSCode2Session) (respJSCode2Sessio if err != nil { return respJSCode2Session{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respJSCode2Session{}, bizErr - } return resp, nil } @@ -65,9 +53,6 @@ func (c *WorkwxApp) execAuthCode2UserInfo(req reqAuthCode2UserInfo) (respAuthCod if err != nil { return respAuthCode2UserInfo{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respAuthCode2UserInfo{}, bizErr - } return resp, nil } @@ -79,9 +64,6 @@ func (c *WorkwxApp) execUserGet(req reqUserGet) (respUserGet, error) { if err != nil { return respUserGet{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respUserGet{}, bizErr - } return resp, nil } @@ -93,9 +75,6 @@ func (c *WorkwxApp) execUserUpdate(req reqUserUpdate) (respUserUpdate, error) { if err != nil { return respUserUpdate{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respUserUpdate{}, bizErr - } return resp, nil } @@ -107,9 +86,6 @@ func (c *WorkwxApp) execUserList(req reqUserList) (respUserList, error) { if err != nil { return respUserList{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respUserList{}, bizErr - } return resp, nil } @@ -121,9 +97,6 @@ func (c *WorkwxApp) execConvertUserIDToOpenID(req reqConvertUserIDToOpenID) (res if err != nil { return respConvertUserIDToOpenID{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respConvertUserIDToOpenID{}, bizErr - } return resp, nil } @@ -135,9 +108,6 @@ func (c *WorkwxApp) execConvertOpenIDToUserID(req reqConvertOpenIDToUserID) (res if err != nil { return respConvertOpenIDToUserID{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respConvertOpenIDToUserID{}, bizErr - } return resp, nil } @@ -149,9 +119,6 @@ func (c *WorkwxApp) execUserJoinQrcode(req reqUserJoinQrcode) (respUserJoinQrcod if err != nil { return respUserJoinQrcode{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respUserJoinQrcode{}, bizErr - } return resp, nil } @@ -163,9 +130,6 @@ func (c *WorkwxApp) execUserIDByMobile(req reqUserIDByMobile) (respUserIDByMobil if err != nil { return respUserIDByMobile{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respUserIDByMobile{}, bizErr - } return resp, nil } @@ -177,9 +141,6 @@ func (c *WorkwxApp) execUserIDByEmail(req reqUserIDByEmail) (respUserIDByEmail, if err != nil { return respUserIDByEmail{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respUserIDByEmail{}, bizErr - } return resp, nil } @@ -191,9 +152,6 @@ func (c *WorkwxApp) execDeptCreate(req reqDeptCreate) (respDeptCreate, error) { if err != nil { return respDeptCreate{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respDeptCreate{}, bizErr - } return resp, nil } @@ -205,9 +163,6 @@ func (c *WorkwxApp) execDeptList(req reqDeptList) (respDeptList, error) { if err != nil { return respDeptList{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respDeptList{}, bizErr - } return resp, nil } @@ -219,9 +174,6 @@ func (c *WorkwxApp) execDeptSimpleList(req reqDeptSimpleList) (respDeptSimpleLis if err != nil { return respDeptSimpleList{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respDeptSimpleList{}, bizErr - } return resp, nil } @@ -233,9 +185,6 @@ func (c *WorkwxApp) execUserInfoGet(req reqUserInfoGet) (respUserInfoGet, error) if err != nil { return respUserInfoGet{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respUserInfoGet{}, bizErr - } return resp, nil } @@ -247,9 +196,6 @@ func (c *WorkwxApp) execExternalContactList(req reqExternalContactList) (respExt if err != nil { return respExternalContactList{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respExternalContactList{}, bizErr - } return resp, nil } @@ -261,9 +207,6 @@ func (c *WorkwxApp) execExternalContactGet(req reqExternalContactGet) (respExter if err != nil { return respExternalContactGet{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respExternalContactGet{}, bizErr - } return resp, nil } @@ -275,9 +218,6 @@ func (c *WorkwxApp) execExternalContactBatchList(req reqExternalContactBatchList if err != nil { return respExternalContactBatchList{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respExternalContactBatchList{}, bizErr - } return resp, nil } @@ -289,9 +229,6 @@ func (c *WorkwxApp) execExternalContactRemark(req reqExternalContactRemark) (res if err != nil { return respExternalContactRemark{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respExternalContactRemark{}, bizErr - } return resp, nil } @@ -303,9 +240,6 @@ func (c *WorkwxApp) execExternalContactListCorpTags(req reqExternalContactListCo if err != nil { return respExternalContactListCorpTags{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respExternalContactListCorpTags{}, bizErr - } return resp, nil } @@ -317,9 +251,6 @@ func (c *WorkwxApp) execExternalContactAddCorpTag(req reqExternalContactAddCorpT if err != nil { return respExternalContactAddCorpTag{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respExternalContactAddCorpTag{}, bizErr - } return resp, nil } @@ -331,9 +262,6 @@ func (c *WorkwxApp) execExternalContactEditCorpTag(req reqExternalContactEditCor if err != nil { return respExternalContactEditCorpTag{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respExternalContactEditCorpTag{}, bizErr - } return resp, nil } @@ -345,9 +273,6 @@ func (c *WorkwxApp) execExternalContactDelCorpTag(req reqExternalContactDelCorpT if err != nil { return respExternalContactDelCorpTag{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respExternalContactDelCorpTag{}, bizErr - } return resp, nil } @@ -359,9 +284,6 @@ func (c *WorkwxApp) execExternalContactMarkTag(req reqExternalContactMarkTag) (r if err != nil { return respExternalContactMarkTag{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respExternalContactMarkTag{}, bizErr - } return resp, nil } @@ -373,9 +295,6 @@ func (c *WorkwxApp) execListUnassignedExternalContact(req reqListUnassignedExter if err != nil { return respListUnassignedExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respListUnassignedExternalContact{}, bizErr - } return resp, nil } @@ -387,9 +306,6 @@ func (c *WorkwxApp) execTransferExternalContact(req reqTransferExternalContact) if err != nil { return respTransferExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respTransferExternalContact{}, bizErr - } return resp, nil } @@ -401,9 +317,6 @@ func (c *WorkwxApp) execGetTransferExternalContactResult(req reqGetTransferExter if err != nil { return respGetTransferExternalContactResult{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respGetTransferExternalContactResult{}, bizErr - } return resp, nil } @@ -415,9 +328,6 @@ func (c *WorkwxApp) execTransferGroupChatExternalContact(req reqTransferGroupCha if err != nil { return respTransferGroupChatExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respTransferGroupChatExternalContact{}, bizErr - } return resp, nil } @@ -429,9 +339,6 @@ func (c *WorkwxApp) execAppchatCreate(req reqAppchatCreate) (respAppchatCreate, if err != nil { return respAppchatCreate{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respAppchatCreate{}, bizErr - } return resp, nil } @@ -443,9 +350,6 @@ func (c *WorkwxApp) execAppchatUpdate(req reqAppchatUpdate) (respAppchatUpdate, if err != nil { return respAppchatUpdate{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respAppchatUpdate{}, bizErr - } return resp, nil } @@ -457,9 +361,6 @@ func (c *WorkwxApp) execAppchatGet(req reqAppchatGet) (respAppchatGet, error) { if err != nil { return respAppchatGet{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respAppchatGet{}, bizErr - } return resp, nil } @@ -471,9 +372,6 @@ func (c *WorkwxApp) execMessageSend(req reqMessage) (respMessageSend, error) { if err != nil { return respMessageSend{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMessageSend{}, bizErr - } return resp, nil } @@ -485,9 +383,6 @@ func (c *WorkwxApp) execAppchatSend(req reqMessage) (respMessageSend, error) { if err != nil { return respMessageSend{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMessageSend{}, bizErr - } return resp, nil } @@ -499,9 +394,6 @@ func (c *WorkwxApp) execMediaUpload(req reqMediaUpload) (respMediaUpload, error) if err != nil { return respMediaUpload{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMediaUpload{}, bizErr - } return resp, nil } @@ -513,9 +405,6 @@ func (c *WorkwxApp) execMediaUploadImg(req reqMediaUploadImg) (respMediaUploadIm if err != nil { return respMediaUploadImg{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMediaUploadImg{}, bizErr - } return resp, nil } @@ -527,9 +416,6 @@ func (c *WorkwxApp) execOAGetTemplateDetail(req reqOAGetTemplateDetail) (respOAG if err != nil { return respOAGetTemplateDetail{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respOAGetTemplateDetail{}, bizErr - } return resp, nil } @@ -541,9 +427,6 @@ func (c *WorkwxApp) execOAApplyEvent(req reqOAApplyEvent) (respOAApplyEvent, err if err != nil { return respOAApplyEvent{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respOAApplyEvent{}, bizErr - } return resp, nil } @@ -555,9 +438,6 @@ func (c *WorkwxApp) execOAGetApprovalInfo(req reqOAGetApprovalInfo) (respOAGetAp if err != nil { return respOAGetApprovalInfo{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respOAGetApprovalInfo{}, bizErr - } return resp, nil } @@ -569,9 +449,6 @@ func (c *WorkwxApp) execOAGetApprovalDetail(req reqOAGetApprovalDetail) (respOAG if err != nil { return respOAGetApprovalDetail{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respOAGetApprovalDetail{}, bizErr - } return resp, nil } @@ -583,9 +460,6 @@ func (c *WorkwxApp) execOAGetCorpVacationConf(req reqOAGetCorpVacationConf) (res if err != nil { return respOAGetCorpVacationConf{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respOAGetCorpVacationConf{}, bizErr - } return resp, nil } @@ -597,9 +471,6 @@ func (c *WorkwxApp) execOAGetUserVacationQuota(req reqOAGetUserVacationQuota) (r if err != nil { return respOAGetUserVacationQuota{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respOAGetUserVacationQuota{}, bizErr - } return resp, nil } @@ -611,9 +482,6 @@ func (c *WorkwxApp) execOASetOneUserVacationQuota(req reqOASetOneUserVacationQuo if err != nil { return respOASetOneUserVacationQuota{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respOASetOneUserVacationQuota{}, bizErr - } return resp, nil } @@ -625,9 +493,6 @@ func (c *WorkwxApp) execMsgAuditListPermitUser(req reqMsgAuditListPermitUser) (r if err != nil { return respMsgAuditListPermitUser{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMsgAuditListPermitUser{}, bizErr - } return resp, nil } @@ -639,9 +504,6 @@ func (c *WorkwxApp) execMsgAuditCheckSingleAgree(req reqMsgAuditCheckSingleAgree if err != nil { return respMsgAuditCheckSingleAgree{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMsgAuditCheckSingleAgree{}, bizErr - } return resp, nil } @@ -653,9 +515,6 @@ func (c *WorkwxApp) execMsgAuditCheckRoomAgree(req reqMsgAuditCheckRoomAgree) (r if err != nil { return respMsgAuditCheckRoomAgree{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMsgAuditCheckRoomAgree{}, bizErr - } return resp, nil } @@ -667,9 +526,6 @@ func (c *WorkwxApp) execMsgAuditGetGroupChat(req reqMsgAuditGetGroupChat) (respM if err != nil { return respMsgAuditGetGroupChat{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMsgAuditGetGroupChat{}, bizErr - } return resp, nil } @@ -681,9 +537,6 @@ func (c *WorkwxApp) execListFollowUserExternalContact(req reqListFollowUserExter if err != nil { return respListFollowUserExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respListFollowUserExternalContact{}, bizErr - } return resp, nil } @@ -695,9 +548,6 @@ func (c *WorkwxApp) execAddContactExternalContact(req reqAddContactExternalConta if err != nil { return respAddContactExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respAddContactExternalContact{}, bizErr - } return resp, nil } @@ -709,9 +559,6 @@ func (c *WorkwxApp) execGetContactWayExternalContact(req reqGetContactWayExterna if err != nil { return respGetContactWayExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respGetContactWayExternalContact{}, bizErr - } return resp, nil } @@ -723,9 +570,6 @@ func (c *WorkwxApp) execListContactWayChatExternalContact(req reqListContactWayE if err != nil { return respListContactWayChatExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respListContactWayChatExternalContact{}, bizErr - } return resp, nil } @@ -737,9 +581,6 @@ func (c *WorkwxApp) execUpdateContactWayExternalContact(req reqUpdateContactWayE if err != nil { return respUpdateContactWayExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respUpdateContactWayExternalContact{}, bizErr - } return resp, nil } @@ -751,9 +592,6 @@ func (c *WorkwxApp) execDelContactWayExternalContact(req reqDelContactWayExterna if err != nil { return respDelContactWayExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respDelContactWayExternalContact{}, bizErr - } return resp, nil } @@ -765,9 +603,6 @@ func (c *WorkwxApp) execCloseTempChatExternalContact(req reqCloseTempChatExterna if err != nil { return respCloseTempChatExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respCloseTempChatExternalContact{}, bizErr - } return resp, nil } @@ -779,9 +614,6 @@ func (c *WorkwxApp) execAddGroupChatJoinWayExternalContact(req reqAddGroupChatJo if err != nil { return respAddGroupChatJoinWayExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respAddGroupChatJoinWayExternalContact{}, bizErr - } return resp, nil } @@ -793,9 +625,6 @@ func (c *WorkwxApp) execGetGroupChatJoinWayExternalContact(req reqGetGroupChatJo if err != nil { return respGetGroupChatJoinWayExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respGetGroupChatJoinWayExternalContact{}, bizErr - } return resp, nil } @@ -807,9 +636,6 @@ func (c *WorkwxApp) execUpdateGroupChatJoinWayExternalContact(req reqUpdateGroup if err != nil { return respUpdateGroupChatJoinWayExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respUpdateGroupChatJoinWayExternalContact{}, bizErr - } return resp, nil } @@ -821,9 +647,6 @@ func (c *WorkwxApp) execDelGroupChatJoinWayExternalContact(req reqDelGroupChatJo if err != nil { return respDelGroupChatJoinWayExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respDelGroupChatJoinWayExternalContact{}, bizErr - } return resp, nil } @@ -835,9 +658,6 @@ func (c *WorkwxApp) execGroupChatListGet(req reqGroupChatList) (respGroupChatLis if err != nil { return respGroupChatList{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respGroupChatList{}, bizErr - } return resp, nil } @@ -849,9 +669,6 @@ func (c *WorkwxApp) execGroupChatInfoGet(req reqGroupChatInfo) (respGroupChatInf if err != nil { return respGroupChatInfo{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respGroupChatInfo{}, bizErr - } return resp, nil } @@ -863,9 +680,6 @@ func (c *WorkwxApp) execConvertOpenGIDToChatID(req reqConvertOpenGIDToChatID) (r if err != nil { return respConvertOpenGIDToChatID{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respConvertOpenGIDToChatID{}, bizErr - } return resp, nil } @@ -877,9 +691,6 @@ func (c *WorkwxApp) execTransferCustomer(req reqTransferCustomer) (respTransferC if err != nil { return respTransferCustomer{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respTransferCustomer{}, bizErr - } return resp, nil } @@ -891,9 +702,6 @@ func (c *WorkwxApp) execGetTransferCustomerResult(req reqGetTransferCustomerResu if err != nil { return respGetTransferCustomerResult{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respGetTransferCustomerResult{}, bizErr - } return resp, nil } @@ -905,9 +713,6 @@ func (c *WorkwxApp) execTransferResignedCustomer(req reqTransferCustomer) (respT if err != nil { return respTransferCustomer{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respTransferCustomer{}, bizErr - } return resp, nil } @@ -919,9 +724,6 @@ func (c *WorkwxApp) execGetTransferResignedCustomerResult(req reqGetTransferCust if err != nil { return respGetTransferCustomerResult{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respGetTransferCustomerResult{}, bizErr - } return resp, nil } @@ -933,9 +735,6 @@ func (c *WorkwxApp) execAddMsgTemplate(req reqAddMsgTemplateExternalContact) (re if err != nil { return respAddMsgTemplateExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respAddMsgTemplateExternalContact{}, bizErr - } return resp, nil } @@ -947,9 +746,6 @@ func (c *WorkwxApp) execSendWelcomeMsg(req reqSendWelcomeMsgExternalContact) (re if err != nil { return respSendWelcomeMsgExternalContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respSendWelcomeMsgExternalContact{}, bizErr - } return resp, nil } @@ -961,9 +757,6 @@ func (c *WorkwxApp) execKfAccountCreate(req reqKfAccountCreate) (respKfAccountCr if err != nil { return respKfAccountCreate{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfAccountCreate{}, bizErr - } return resp, nil } @@ -975,9 +768,6 @@ func (c *WorkwxApp) execKfAccountUpdate(req reqKfAccountUpdate) (respKfAccountUp if err != nil { return respKfAccountUpdate{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfAccountUpdate{}, bizErr - } return resp, nil } @@ -989,9 +779,6 @@ func (c *WorkwxApp) execKfAccountDelete(req reqKfAccountDelete) (respKfAccountDe if err != nil { return respKfAccountDelete{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfAccountDelete{}, bizErr - } return resp, nil } @@ -1003,9 +790,6 @@ func (c *WorkwxApp) execKfAccountList(req reqKfAccountList) (respKfAccountList, if err != nil { return respKfAccountList{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfAccountList{}, bizErr - } return resp, nil } @@ -1017,9 +801,6 @@ func (c *WorkwxApp) execAddKfContact(req reqAddKfContact) (respAddKfContact, err if err != nil { return respAddKfContact{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respAddKfContact{}, bizErr - } return resp, nil } @@ -1031,9 +812,6 @@ func (c *WorkwxApp) execKfServicerCreate(req reqKfServicerCreate) (respKfService if err != nil { return respKfServicerCreate{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfServicerCreate{}, bizErr - } return resp, nil } @@ -1045,9 +823,6 @@ func (c *WorkwxApp) execKfServicerDelete(req reqKfServicerDelete) (respKfService if err != nil { return respKfServicerDelete{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfServicerDelete{}, bizErr - } return resp, nil } @@ -1059,9 +834,6 @@ func (c *WorkwxApp) execKfServicerList(req reqKfServicerList) (respKfServicerLis if err != nil { return respKfServicerList{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfServicerList{}, bizErr - } return resp, nil } @@ -1073,9 +845,6 @@ func (c *WorkwxApp) execKfServiceStateGet(req reqKfServiceStateGet) (respKfServi if err != nil { return respKfServiceStateGet{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfServiceStateGet{}, bizErr - } return resp, nil } @@ -1087,9 +856,6 @@ func (c *WorkwxApp) execKfServiceStateTrans(req reqKfServiceStateTrans) (respKfS if err != nil { return respKfServiceStateTrans{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfServiceStateTrans{}, bizErr - } return resp, nil } @@ -1101,9 +867,6 @@ func (c *WorkwxApp) execKfSyncMsg(req reqKfSyncMsg) (respKfSyncMsg, error) { if err != nil { return respKfSyncMsg{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respKfSyncMsg{}, bizErr - } return resp, nil } @@ -1115,9 +878,6 @@ func (c *WorkwxApp) execKfSend(req reqMessage) (respMessageSend, error) { if err != nil { return respMessageSend{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMessageSend{}, bizErr - } return resp, nil } @@ -1129,9 +889,6 @@ func (c *WorkwxApp) execKfOnEventSend(req reqMessage) (respMessageSend, error) { if err != nil { return respMessageSend{}, err } - if bizErr := resp.TryIntoErr(); bizErr != nil { - return respMessageSend{}, bizErr - } return resp, nil } diff --git a/internal/sdkcodegen/emit.go b/internal/sdkcodegen/emit.go index 7cfd9f3..7e134dd 100644 --- a/internal/sdkcodegen/emit.go +++ b/internal/sdkcodegen/emit.go @@ -179,9 +179,6 @@ func (e *goEmitter) emitAPICall(x *apiCall) error { // TODO: error_chain e.e("return %s{}, err\n", x.respType) e.e("}\n") - e.e("if bizErr := resp.TryIntoErr(); bizErr != nil {\n") - e.e("return %s{}, bizErr\n", x.respType) - e.e("}\n") e.e("\n") e.e("return resp, nil\n") e.e("}\n") From 52c46437031fd29e40b8e2d161fdb944d4304d07 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Thu, 19 Dec 2024 15:44:54 +0800 Subject: [PATCH 8/8] feat: sync errcodes with vendor doc --- errcodes/mod.go | 2779 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 1981 insertions(+), 798 deletions(-) diff --git a/errcodes/mod.go b/errcodes/mod.go index 85dfb50..0418716 100644 --- a/errcodes/mod.go +++ b/errcodes/mod.go @@ -5,7 +5,7 @@ package errcodes // ErrCode 错误码类型 // // 全局错误码文档: https://developer.work.weixin.qq.com/document/path/90313 -// 文档爬取时间: 2024-04-08 19:03:10 +0800 +// 文档爬取时间: 2024-12-19 15:43:50 +0800 // // NOTE: 关于错误码的名字为何如此无聊: // @@ -259,12 +259,24 @@ const ErrCode40050 ErrCode = 40050 // ErrCode40054 不合法的子菜单url域名 // -// 排查方法: [查看帮助](#错误码:40054 40055) +// 排查方法: [查看帮助] +// +// 菜单设置URL不合法。确认: +// 1)链接需要带上协议头。以 http:// 或者 https:// 开头。比如:https://work.weixin.qq.com +// 2)微信支付的链接,必须以 weixin://wxpay/bizpayurl 开头 +// +// [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A40054%2040055 const ErrCode40054 ErrCode = 40054 // ErrCode40055 不合法的菜单url域名 // -// 排查方法: [查看帮助](#错误码:40054 40055) +// 排查方法: [查看帮助] +// +// 菜单设置URL不合法。确认: +// 1)链接需要带上协议头。以 http:// 或者 https:// 开头。比如:https://work.weixin.qq.com +// 2)微信支付的链接,必须以 weixin://wxpay/bizpayurl 开头 +// +// [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A40054%2040055 const ErrCode40055 ErrCode = 40055 // ErrCode40056 不合法的agentid @@ -476,7 +488,7 @@ const ErrCode40097 ErrCode = 40097 // 排查方法: 确认传入的userid是已经过实名认证成员的 const ErrCode40098 ErrCode = 40098 -// ErrCode40099 外部联系人的数量已达上限 +// ErrCode40099 成员的外部联系人数量已达上限 // // 排查方法: - const ErrCode40099 ErrCode = 40099 @@ -491,6 +503,11 @@ const ErrCode40100 ErrCode = 40100 // 排查方法: - const ErrCode40102 ErrCode = 40102 +// ErrCode40106 device_access_token非法 +// +// 排查方法: - +const ErrCode40106 ErrCode = 40106 + // ErrCode40123 上传临时图片素材,图片格式非法 // // 排查方法: 请确认上传的内容是否为合法的图片内容。可能的原因有:1.图片有损坏 2. 入参的图片大小与实际大小不一致。 @@ -596,6 +613,11 @@ const ErrCode40142 ErrCode = 40142 // 排查方法: - const ErrCode40143 ErrCode = 40143 +// ErrCode40145 mediaid已过期失效 +// +// 排查方法: - +const ErrCode40145 ErrCode = 40145 + // ErrCode40165 已经升级了客户群ID,无法再次升级 // // 排查方法: - @@ -611,6 +633,11 @@ const ErrCode40166 ErrCode = 40166 // 排查方法: - const ErrCode40167 ErrCode = 40167 +// ErrCode40168 已经超过了指定的升级时间 +// +// 排查方法: - +const ErrCode40168 ErrCode = 40168 + // ErrCode40201 当前操作包含敏感信息,被反垃圾拦截 // // 排查方法: - @@ -717,6 +744,16 @@ const ErrCode41011 ErrCode = 41011 // 排查方法: 发送图文消息,标题是必填参数。请确认参数是否有传递。 const ErrCode41016 ErrCode = 41016 +// ErrCode41017 缺少tagid参数 +// +// 排查方法: - +const ErrCode41017 ErrCode = 41017 + +// ErrCode41018 缺少标签名 +// +// 排查方法: - +const ErrCode41018 ErrCode = 41018 + // ErrCode41019 缺少 department 参数 // // 排查方法: [查看帮助] @@ -728,16 +765,6 @@ const ErrCode41016 ErrCode = 41016 // [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A41019 const ErrCode41019 ErrCode = 41019 -// ErrCode41017 缺少tagid参数 -// -// 排查方法: - -const ErrCode41017 ErrCode = 41017 - -// ErrCode41018 缺少标签名 -// -// 排查方法: - -const ErrCode41018 ErrCode = 41018 - // ErrCode41021 缺少suite_id参数 // // 排查方法: - @@ -1101,6 +1128,11 @@ const ErrCode41099 ErrCode = 41099 // 排查方法: - const ErrCode41102 ErrCode = 41102 +// ErrCode41200 仅部分经营类目企业支持 +// +// 排查方法: - +const ErrCode41200 ErrCode = 41200 + // ErrCode42001 access_token已过期 // // 排查方法: access_token有时效性,需要重新获取一次 @@ -1111,6 +1143,11 @@ const ErrCode42001 ErrCode = 42001 // 排查方法: - const ErrCode42003 ErrCode = 42003 +// ErrCode42006 使用会话展示组件或通讯展示组件时登录态失效 +// +// 排查方法: - +const ErrCode42006 ErrCode = 42006 + // ErrCode42007 pre_auth_code已过期 // // 排查方法: pre_auth_code有时效性,需要重新获取一次 @@ -1445,6 +1482,24 @@ const ErrCode45033 ErrCode = 45033 // 排查方法: 在url前面加上协议头 http:// 或 https:// const ErrCode45034 ErrCode = 45034 +// ErrCode45035 并发操作冲突 +// +// 排查方法: [查看帮助] +// +// 接口并发调用过程中出现数据操作冲突。企业微信出于保护数据正确性的考虑,在某些场景会下,会禁止接口同时修改同一条记录,例如调用“编辑客户企业标签”接口同时对一组客户和成员打标签,或是调用“分配离职成员的客户”接口同时为某个成员分配客户。 +// +// [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A45035 +const ErrCode45035 ErrCode = 45035 + +// ErrCode45036 数据访问超过限制 +// +// 排查方法: [查看帮助] +// +// 数据访问超过限制。在接口调用过程中,因出现异常流量,企业微信出于系统保护的考虑,会对出现异常流量的数据进行访问限制。当出现此错误时,企业/服务商可以尝试调整参数、适当降低调用频率、并发等措施并进行重试;如果调用接口的频次,并发都在合理范围内,则需要排查当前企业下是否存在使用非官方的企业微信客户端的情况。 +// +// [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A45036 +const ErrCode45036 ErrCode = 45036 + // ErrCode46003 菜单未设置 // // 排查方法: 菜单需发布后才能获取到数据 @@ -1537,6 +1592,13 @@ const ErrCode48008 ErrCode = 48008 // [通讯录同步接口调整]: https://developer.work.weixin.qq.com/document/path/90313#40802 const ErrCode48009 ErrCode = 48009 +// ErrCode48010 使用了不支持的TLS版本 +// +// 排查方法: [查看帮助] +// +// [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#55963 +const ErrCode48010 ErrCode = 48010 + // ErrCode49004 签名不匹配 // // 排查方法: - @@ -1844,6 +1906,21 @@ const ErrCode60148 ErrCode = 60148 // 排查方法: - const ErrCode60149 ErrCode = 60149 +// ErrCode60150 扩展属性类型不正确 +// +// 排查方法: - +const ErrCode60150 ErrCode = 60150 + +// ErrCode60151 description字段长度超过限制 +// +// 排查方法: - +const ErrCode60151 ErrCode = 60151 + +// ErrCode60152 拓展属性description字段非法 +// +// 排查方法: - +const ErrCode60152 ErrCode = 60152 + // ErrCode60203 不合法的模版ID // // 排查方法: - @@ -2039,6 +2116,36 @@ const ErrCode60244 ErrCode = 60244 // 排查方法: 检查第三方应用上线状态 const ErrCode60246 ErrCode = 60246 +// ErrCode60251 缺少openkfid +// +// 排查方法: - +const ErrCode60251 ErrCode = 60251 + +// ErrCode60252 非法的openkfid +// +// 排查方法: 检查openkfid是否拼写正确 +const ErrCode60252 ErrCode = 60252 + +// ErrCode60253 客服不在接待人员列表中 +// +// 排查方法: 检查传入的客服id是否在接待人员列表中 +const ErrCode60253 ErrCode = 60253 + +// ErrCode60257 设置直属上级数量超过最大数量限制(5个) +// +// 排查方法: - +const ErrCode60257 ErrCode = 60257 + +// ErrCode60267 时间参数不合法 +// +// 排查方法: 开始时间不能早于180天前;结束时间需要大于开始时间,并且时间跨度不能超过7天 +const ErrCode60267 ErrCode = 60267 + +// ErrCode60268 cursor参数不合法 +// +// 排查方法: 检查是否使用上次调用本接口时返回的cursor,并且没有改动过滤条件 +const ErrCode60268 ErrCode = 60268 + // ErrCode65000 学校已经迁移 // // 排查方法: - @@ -2139,270 +2246,159 @@ const ErrCode65023 ErrCode = 65023 // 排查方法: 检查学生的班主任、任课教师或家长所在班级群群主是否在应用可见范围内 const ErrCode65024 ErrCode = 65024 -// ErrCode400237 location的长度超过最大限制 -// -// 排查方法: - -const ErrCode400237 ErrCode = 400237 - -// ErrCode660001 无效的商户号 -// -// 排查方法: 请检查商户号是否正确 -const ErrCode660001 ErrCode = 660001 - -// ErrCode660002 无效的企业收款人id +// ErrCode71044 设备已绑定,删除失败 // -// 排查方法: 请检查payee_userid是否正确 -const ErrCode660002 ErrCode = 660002 +// 排查方法: 设备绑定情况下,无法取消登记 +const ErrCode71044 ErrCode = 71044 -// ErrCode660003 userid不在应用的可见范围 +// ErrCode71045 operid非法 // // 排查方法: - -const ErrCode660003 ErrCode = 660003 +const ErrCode71045 ErrCode = 71045 -// ErrCode660004 partyid不在应用的可见范围 +// ErrCode71046 无设备数据权限 // // 排查方法: - -const ErrCode660004 ErrCode = 660004 +const ErrCode71046 ErrCode = 71046 -// ErrCode660005 tagid不在应用的可见范围 +// ErrCode71047 openuserid参数非法 // // 排查方法: - -const ErrCode660005 ErrCode = 660005 +const ErrCode71047 ErrCode = 71047 -// ErrCode660006 找不到该商户号 +// ErrCode71048 应用无授权设备 // // 排查方法: - -const ErrCode660006 ErrCode = 660006 - -// ErrCode660007 申请已经存在 -// -// 排查方法: 不需要重复申请 -const ErrCode660007 ErrCode = 660007 - -// ErrCode660008 商户号已经绑定 -// -// 排查方法: 不需要重新提交申请 -const ErrCode660008 ErrCode = 660008 +const ErrCode71048 ErrCode = 71048 -// ErrCode660009 商户号主体和商户主体不一致 +// ErrCode71049 考勤规则达到通过APP设置的上限 // // 排查方法: - -const ErrCode660009 ErrCode = 660009 +const ErrCode71049 ErrCode = 71049 -// ErrCode660010 超过商户号绑定数量限制 +// ErrCode71050 门禁规则名称非法 // // 排查方法: - -const ErrCode660010 ErrCode = 660010 +const ErrCode71050 ErrCode = 71050 -// ErrCode660011 商户号未绑定 +// ErrCode71051 门禁规则非法 // // 排查方法: - -const ErrCode660011 ErrCode = 660011 +const ErrCode71051 ErrCode = 71051 -// ErrCode660012 无效的paymentid +// ErrCode71052 获取测温数据错误 // // 排查方法: - -const ErrCode660012 ErrCode = 660012 +const ErrCode71052 ErrCode = 71052 -// ErrCode660013 对外收款系统应用被关闭了 +// ErrCode71056 userid不在设备可见范围内 // // 排查方法: - -const ErrCode660013 ErrCode = 660013 - -// ErrCode660014 接口已废弃 -// -// 排查方法: 请前往企业微信管理后台-应用管理-对外收款中创建/删除商户号 -const ErrCode660014 ErrCode = 660014 - -// ErrCode670001 应用不在共享范围 -// -// 排查方法: [查看帮助] -// -// 上游企业获取下游企业的access_token时,请确认: -// 1) 传入的access_token是否上游应用。 -// 2) 传入的corpid与agentid是否是通过获取共享范围接口获取。 -// -// [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A670001 -const ErrCode670001 ErrCode = 670001 +const ErrCode71056 ErrCode = 71056 -// ErrCode670002 无效上下游chain_id +// ErrCode71057 门禁规则id非法 // // 排查方法: - -const ErrCode670002 ErrCode = 670002 +const ErrCode71057 ErrCode = 71057 -// ErrCode670003 无效上下游分组id +// ErrCode71058 userid不在应用可见范围内 // // 排查方法: - -const ErrCode670003 ErrCode = 670003 +const ErrCode71058 ErrCode = 71058 -// ErrCode670004 企业不在上下游范围内 +// ErrCode71059 门禁规则的配置范围超过授权应用可见范围,不可删除和修改 // // 排查方法: - -const ErrCode670004 ErrCode = 670004 +const ErrCode71059 ErrCode = 71059 -// ErrCode670005 超过上下游人企业数上限 +// ErrCode71060 门禁规则的配置范围超过授权应用可见范围,不可删除和修改 // // 排查方法: - -const ErrCode670005 ErrCode = 670005 +const ErrCode71060 ErrCode = 71060 -// ErrCode670006 无效上下游规则id +// ErrCode71062 文件名称非法 // // 排查方法: - -const ErrCode670006 ErrCode = 670006 +const ErrCode71062 ErrCode = 71062 -// ErrCode670007 上下游规则id数量超出限制 +// ErrCode71063 同时缺少media_id和download_url参数 // // 排查方法: - -const ErrCode670007 ErrCode = 670007 +const ErrCode71063 ErrCode = 71063 -// ErrCode670008 分组不唯一 +// ErrCode71064 download_url非法或者从download_url下载文件失败 // // 排查方法: - -const ErrCode670008 ErrCode = 670008 +const ErrCode71064 ErrCode = 71064 -// ErrCode670009 自定义id不唯一 +// ErrCode71065 硬件不支持打印功能禁止调用 // // 排查方法: - -const ErrCode670009 ErrCode = 670009 +const ErrCode71065 ErrCode = 71065 -// ErrCode670010 负责人数量超出限制 +// ErrCode71066 硬件不支持扫描功能禁止调用 // // 排查方法: - -const ErrCode670010 ErrCode = 670010 +const ErrCode71066 ErrCode = 71066 -// ErrCode670011 不合法的自定义id。上下游企业自定义id只支持64个字符以内的字母和数字 +// ErrCode71067 打印文件转码配置版本不合法 // // 排查方法: - -const ErrCode670011 ErrCode = 670011 +const ErrCode71067 ErrCode = 71067 -// ErrCode670012 导入企业名称为空 +// ErrCode71068 打印文件转码配置版本过期 // // 排查方法: - -const ErrCode670012 ErrCode = 670012 +const ErrCode71068 ErrCode = 71068 -// ErrCode670013 不合法的企业名称。企业名只支持30个字符以内的中/英文、数字、合法字符 +// ErrCode71069 打印文件转码页码不合法 // // 排查方法: - -const ErrCode670013 ErrCode = 670013 +const ErrCode71069 ErrCode = 71069 -// ErrCode670014 上下游联系人姓名为空 +// ErrCode71070 userid 不在设备使用范围内 // // 排查方法: - -const ErrCode670014 ErrCode = 670014 +const ErrCode71070 ErrCode = 71070 -// ErrCode670015 不合法的上下游联系人姓名 +// ErrCode71071 时间戳不合法 // // 排查方法: - -const ErrCode670015 ErrCode = 670015 +const ErrCode71071 ErrCode = 71071 -// ErrCode670016 不合法的身份字段。身份字段只支持填写负责人或成员 +// ErrCode71072 设备型号未发布,禁止调用此接口 // -// 排查方法: - -const ErrCode670016 ErrCode = 670016 +// 排查方法: 发布该型号后重试 +const ErrCode71072 ErrCode = 71072 -// ErrCode670017 分组名和同层级企业名重复 +// ErrCode71075 扫描上传文件授权码不合法 // // 排查方法: - -const ErrCode670017 ErrCode = 670017 +const ErrCode71075 ErrCode = 71075 -// ErrCode670018 该联系人账号异常,无法邀请其加入上下游 +// ErrCode71076 禁止修改或者删除默认不可通行规则 // // 排查方法: - -const ErrCode670018 ErrCode = 670018 +const ErrCode71076 ErrCode = 71076 -// ErrCode670019 导入上下游后单个企业人数超出限制 +// ErrCode71077 非法的bio_info_type // // 排查方法: - -const ErrCode670019 ErrCode = 670019 +const ErrCode71077 ErrCode = 71077 -// ErrCode670020 分组层级不可超过9层 +// ErrCode71078 硬件型号不支持该bio_info_type // // 排查方法: - -const ErrCode670020 ErrCode = 670020 +const ErrCode71078 ErrCode = 71078 -// ErrCode670021 不合法的分组名称 +// ErrCode72023 发票已被其他公众号锁定 // -// 排查方法: - -const ErrCode670021 ErrCode = 670021 - -// ErrCode670022 有导入任务正在进行 +// 排查方法: [查看帮助] // -// 排查方法: - -const ErrCode670022 ErrCode = 670022 - -// ErrCode670023 超过每日导入人数限制 +// 一般为发票已进入后续报销流程,报销企业公众号/企业微信/App锁定了发票。 // -// 排查方法: - -const ErrCode670023 ErrCode = 670023 - -// ErrCode670024 账号异常,不能进行导入 -// -// 排查方法: - -const ErrCode670024 ErrCode = 670024 - -// ErrCode670025 导入数据超出限制。检查导入数据单个企业人数、企业数以及总人数是否超出限制 -// -// 排查方法: - -const ErrCode670025 ErrCode = 670025 - -// ErrCode670026 上下游空间加入企业超出限制 -// -// 排查方法: - -const ErrCode670026 ErrCode = 670026 - -// ErrCode670027 不可以移除上下游创建者 -// -// 排查方法: - -const ErrCode670027 ErrCode = 670027 - -// ErrCode670028 企业名称不唯一 -// -// 排查方法: - -const ErrCode670028 ErrCode = 670028 - -// ErrCode670029 成员、部门不在上下游范围 -// -// 排查方法: - -const ErrCode670029 ErrCode = 670029 - -// ErrCode670030 无权限操作此groupid。检查groupid是否在应用共享范围内 -// -// 排查方法: - -const ErrCode670030 ErrCode = 670030 - -// ErrCode670031 根据管理员设置,存在联系人无权加入其他企业创建的上下游 -// -// 排查方法: - -const ErrCode670031 ErrCode = 670031 - -// ErrCode670032 成员自定义id不合法 -// -// 排查方法: - -const ErrCode670032 ErrCode = 670032 - -// ErrCode670033 当前成员填写了多个自定义id -// -// 排查方法: - -const ErrCode670033 ErrCode = 670033 - -// ErrCode670034 成员自定义id跟当前下游企业其他成员重复 -// -// 排查方法: - -const ErrCode670034 ErrCode = 670034 - -// ErrCode670035 成员没有设置自定义id -// -// 排查方法: - -const ErrCode670035 ErrCode = 670035 - -// ErrCode72023 发票已被其他公众号锁定 -// -// 排查方法: [查看帮助] -// -// 一般为发票已进入后续报销流程,报销企业公众号/企业微信/App锁定了发票。 -// -// [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A72023 -const ErrCode72023 ErrCode = 72023 +// [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A72023 +const ErrCode72023 ErrCode = 72023 // ErrCode72024 发票状态错误 // @@ -2418,11 +2414,6 @@ const ErrCode72024 ErrCode = 72024 // [批量更新发票状态]: https://developer.work.weixin.qq.com/document/path/90313#11634 const ErrCode72037 ErrCode = 72037 -// ErrCode701112 民生行业优惠政策已到期 -// -// 排查方法: - -const ErrCode701112 ErrCode = 701112 - // ErrCode80001 可信域名不正确,或者无ICP备案 // // 排查方法: [查看帮助] @@ -2560,12 +2551,12 @@ const ErrCode82004 ErrCode = 82004 // ErrCode82101 指定的更新对象为空 // -// 排查方法: +// 排查方法: - const ErrCode82101 ErrCode = 82101 // ErrCode82102 指定的更新对象不在多人消息内 // -// 排查方法: +// 排查方法: - const ErrCode82102 ErrCode = 82102 // ErrCode84005 第三方应用不存在 @@ -3214,6 +3205,11 @@ const ErrCode84178 ErrCode = 84178 // 排查方法: - const ErrCode84180 ErrCode = 84180 +// ErrCode84182 已购买的版本才允许续期或扩容 +// +// 排查方法: - +const ErrCode84182 ErrCode = 84182 + // ErrCode84186 当前版本的剩余时长超过一年,不支持新购 // // 排查方法: - @@ -3224,6 +3220,16 @@ const ErrCode84186 ErrCode = 84186 // 排查方法: - const ErrCode84188 ErrCode = 84188 +// ErrCode84189 (正在生效)的应用设置新购的时候不支持设置开始时间 +// +// 排查方法: - +const ErrCode84189 ErrCode = 84189 + +// ErrCode84195 提交的续期任务中有重复的userid +// +// 排查方法: - +const ErrCode84195 ErrCode = 84195 + // ErrCode84200 文件转译解析错误 // // 排查方法: 只支持utf8文件转译,可能是不支持的文件类型或者格式 @@ -3277,7 +3283,7 @@ const ErrCode85010 ErrCode = 85010 // ErrCode85011 校验回调地址失败 // -// 排查方法: +// 排查方法: - const ErrCode85011 ErrCode = 85011 // ErrCode85012 存在不合法的权限名称 @@ -3414,6 +3420,21 @@ const ErrCode86222 ErrCode = 86222 // 排查方法: - const ErrCode86224 ErrCode = 86224 +// ErrCode86225 不允许删除课程群群主 +// +// 排查方法: 课程群删除群主的时候必须指定新群主 +const ErrCode86225 ErrCode = 86225 + +// ErrCode86226 指定的课程群群主没有课程群创建权限 +// +// 排查方法: - +const ErrCode86226 ErrCode = 86226 + +// ErrCode86227 调用课程群API接口的企业不是高等教育行业 +// +// 排查方法: - +const ErrCode86227 ErrCode = 86227 + // ErrCode90001 未认证摇一摇周边 // // 排查方法: - @@ -4240,6 +4261,16 @@ const ErrCode90708 ErrCode = 90708 // 排查方法: - const ErrCode90710 ErrCode = 90710 +// ErrCode90711 会议室已被停用,无法预定 +// +// 排查方法: - +const ErrCode90711 ErrCode = 90711 + +// ErrCode90712 无法删除默认日历本 +// +// 排查方法: - +const ErrCode90712 ErrCode = 90712 + // ErrCode91040 获取ticket的类型无效 // // 排查方法: [查看帮助] @@ -4354,6 +4385,36 @@ const ErrCode94007 ErrCode = 94007 // 排查方法: - const ErrCode94008 ErrCode = 94008 +// ErrCode94010 缺少title字段 +// +// 排查方法: - +const ErrCode94010 ErrCode = 94010 + +// ErrCode94011 webview高度类型不正确 +// +// 排查方法: - +const ErrCode94011 ErrCode = 94011 + +// ErrCode94012 缺少data字段 +// +// 排查方法: - +const ErrCode94012 ErrCode = 94012 + +// ErrCode94013 image配置的url字段不合法 +// +// 排查方法: - +const ErrCode94013 ErrCode = 94013 + +// ErrCode94014 list配置的title字段不合法 +// +// 排查方法: - +const ErrCode94014 ErrCode = 94014 + +// ErrCode94015 webview配置的url字段不合法 +// +// 排查方法: - +const ErrCode94015 ErrCode = 94015 + // ErrCode95000 不合法的open_kfid // // 排查方法: - @@ -4488,6 +4549,11 @@ const ErrCode95031 ErrCode = 95031 // 排查方法: 请联系官方对接人员沟通处理 const ErrCode95032 ErrCode = 95032 +// ErrCode95033 msgid重复 +// +// 排查方法: - +const ErrCode95033 ErrCode = 95033 + // ErrCode301002 无权限操作指定的应用 // // 排查方法: [查看帮助] @@ -4506,6 +4572,11 @@ const ErrCode301002 ErrCode = 301002 // 排查方法: 创建者不允许从通讯录中删除。如果需要删除该成员,需要先在WEB管理端转移创建者身份。 const ErrCode301005 ErrCode = 301005 +// ErrCode301007 企业不可用,可能已经被解散或者被禁封 +// +// 排查方法: - +const ErrCode301007 ErrCode = 301007 + // ErrCode301012 参数 position 不合法 // // 排查方法: 长度不允许超过128个字符 @@ -4609,6 +4680,21 @@ const ErrCode301042 ErrCode = 301042 // 排查方法: - const ErrCode301048 ErrCode = 301048 +// ErrCode301049 调用接口的应用未在紧急通知应用中关联 +// +// 排查方法: - +const ErrCode301049 ErrCode = 301049 + +// ErrCode301050 紧急通知应用未开启 +// +// 排查方法: - +const ErrCode301050 ErrCode = 301050 + +// ErrCode301051 紧急通知应用余额不足 +// +// 排查方法: - +const ErrCode301051 ErrCode = 301051 + // ErrCode301052 会话存档服务已过期 // // 排查方法: - @@ -4623,9 +4709,24 @@ const ErrCode301053 ErrCode = 301053 // // 排查方法: [查看帮助] // +// 无审批应用权限/无审批应用数据拉取权限。常见的错误原因有: +// 1) 应用没有审批权限,自建应用需要配置到审批应用的可调用应用列表里,第三方应用需要在应用详情内开启审批权限。 +// 2) 离职成员userid不支持作为过滤条件拉取表单记录,当传入离职成员的userid时也会提示无审批权限。 +// 3) 传入的参数异常,无法解析出传入的参数内容,例如无法解析出userid。 +// // [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A301055 const ErrCode301055 ErrCode = 301055 +// ErrCode301056 审批应用已停用 +// +// 排查方法: - +const ErrCode301056 ErrCode = 301056 + +// ErrCode301057 通用错误码,提交审批单内部接口失败 +// +// 排查方法: - +const ErrCode301057 ErrCode = 301057 + // ErrCode301058 拉取会话数据请求超过大小限制,可减少limit参数 // // 排查方法: - @@ -4646,11 +4747,31 @@ const ErrCode301060 ErrCode = 301060 // 排查方法: - const ErrCode301061 ErrCode = 301061 +// ErrCode301062 没有假勤权限 +// +// 排查方法: - +const ErrCode301062 ErrCode = 301062 + +// ErrCode301063 参数错误 +// +// 排查方法: - +const ErrCode301063 ErrCode = 301063 + +// ErrCode301064 内部错误 +// +// 排查方法: - +const ErrCode301064 ErrCode = 301064 + // ErrCode301073 设置排班的时间参数不合法 // // 排查方法: openapi目前仅支持对未来日期设置排班 const ErrCode301073 ErrCode = 301073 +// ErrCode301079 审批单假勤时间有冲突 +// +// 排查方法: - +const ErrCode301079 ErrCode = 301079 + // ErrCode301080 应打卡时间非法 // // 排查方法: 卡点不需要打卡或没有这个应打卡时间的卡点 @@ -4775,35 +4896,30 @@ const ErrCode301104 ErrCode = 301104 // 排查方法: - const ErrCode301105 ErrCode = 301105 -// ErrCode301056 审批应用已停用 +// ErrCode301111 会话存档SDK版本过低,请更新到最新版本的SDK // // 排查方法: - -const ErrCode301056 ErrCode = 301056 +const ErrCode301111 ErrCode = 301111 -// ErrCode301057 通用错误码,提交审批单内部接口失败 +// ErrCode301112 请缩小查询时间范围重试 // // 排查方法: - -const ErrCode301057 ErrCode = 301057 +const ErrCode301112 ErrCode = 301112 -// ErrCode301079 审批单假勤时间有冲突 +// ErrCode301113 审批中的审批打卡不能补卡,补卡后原审批打卡的信息会清除 // -// 排查方法: - -const ErrCode301079 ErrCode = 301079 +// 排查方法: 排查预期补卡的记录是否为审批中的审批打卡 +const ErrCode301113 ErrCode = 301113 -// ErrCode301063 参数错误 +// ErrCode301115 模板已配置自定义打印格式,不支持API修改模板 // // 排查方法: - -const ErrCode301063 ErrCode = 301063 +const ErrCode301115 ErrCode = 301115 -// ErrCode301064 内部错误 +// ErrCode301116 第三方不可调用该企业会话内容存档SDK // // 排查方法: - -const ErrCode301064 ErrCode = 301064 - -// ErrCode301062 没有假勤权限 -// -// 排查方法: -const ErrCode301062 ErrCode = 301062 +const ErrCode301116 ErrCode = 301116 // ErrCode302003 批量导入任务的文件中userid有重复 // @@ -4835,6 +4951,26 @@ const ErrCode302007 ErrCode = 302007 // 排查方法: - const ErrCode302008 ErrCode = 302008 +// ErrCode400010 block_hint非法 +// +// 排查方法: - +const ErrCode400010 ErrCode = 400010 + +// ErrCode400011 block_hint对应的拦截已过期 +// +// 排查方法: - +const ErrCode400011 ErrCode = 400011 + +// ErrCode400012 不允许通过该block_hint解除拦截 +// +// 排查方法: - +const ErrCode400012 ErrCode = 400012 + +// ErrCode400013 解拦截次数超过限制 +// +// 排查方法: - +const ErrCode400013 ErrCode = 400013 + // ErrCode400020 会议参与人超过限制 // // 排查方法: - @@ -4950,70 +5086,115 @@ const ErrCode400044 ErrCode = 400044 // 排查方法: - const ErrCode400045 ErrCode = 400045 -// ErrCode2000002 CorpId参数无效 -// -// 排查方法: 指定的CorpId不存在 -const ErrCode2000002 ErrCode = 2000002 - -// ErrCode2000003 不存在远程开门的数据 +// ErrCode400218 有参会成员未购买专业版账号 // // 排查方法: - -const ErrCode2000003 ErrCode = 2000003 +const ErrCode400218 ErrCode = 400218 -// ErrCode2000004 远程开门数据记录的设备与当前请求设备不匹配 +// ErrCode400219 会议发起人未购买专业版账号 // // 排查方法: - -const ErrCode2000004 ErrCode = 2000004 +const ErrCode400219 ErrCode = 400219 -// ErrCode2000007 远程开门上报开门状态错误 +// ErrCode400220 创建会议行为异常,被风控策略拦截 // // 排查方法: - -const ErrCode2000007 ErrCode = 2000007 +const ErrCode400220 ErrCode = 400220 -// ErrCode2000009 门禁扫码开门上报开门operid非法 +// ErrCode400221 正在进行中或者已经结束的会议不允许更新 // // 排查方法: - -const ErrCode2000009 ErrCode = 2000009 +const ErrCode400221 ErrCode = 400221 -// ErrCode2000010 门禁扫码开门上报开门状态错误 +// ErrCode400222 会议开始时间不允许小于当前时间 // // 排查方法: - -const ErrCode2000010 ErrCode = 2000010 - -// ErrCode600001 不合法的sn -// -// 排查方法: sn可能尚未进行登记 -const ErrCode600001 ErrCode = 600001 +const ErrCode400222 ErrCode = 400222 -// ErrCode600002 设备已注册 +// ErrCode400223 开始时间或者结束时间不合法 // -// 排查方法: 可能设备已经建立过长连接 -const ErrCode600002 ErrCode = 600002 +// 排查方法: - +const ErrCode400223 ErrCode = 400223 -// ErrCode600003 不合法的硬件activecode +// ErrCode400224 会中或者已经结束的会议不能取消 // // 排查方法: - -const ErrCode600003 ErrCode = 600003 +const ErrCode400224 ErrCode = 400224 -// ErrCode600004 该硬件尚未授权任何企业 +// ErrCode400226 企业购买「会议高级功能」后才可以使用该字段 // // 排查方法: - -const ErrCode600004 ErrCode = 600004 +const ErrCode400226 ErrCode = 400226 -// ErrCode600005 硬件Secret无效 +// ErrCode400227 非法的重复类型 // // 排查方法: - -const ErrCode600005 ErrCode = 600005 +const ErrCode400227 ErrCode = 400227 -// ErrCode600006 硬件deviceid无效 +// ErrCode400228 重复次数不合法 // // 排查方法: - -const ErrCode600006 ErrCode = 600006 +const ErrCode400228 ErrCode = 400228 -// ErrCode600007 缺少硬件sn +// ErrCode400237 location的长度超过最大限制 // // 排查方法: - -const ErrCode600007 ErrCode = 600007 +const ErrCode400237 ErrCode = 400237 + +// ErrCode400301 5分钟内有相同的会议正在创建中,暂不可再创建 +// +// 排查方法: 若相同的会议未创建成功,可于相同会议首次创建时间5分钟后重新创建 +const ErrCode400301 ErrCode = 400301 + +// ErrCode400302 相同的会议已经创建成功 +// +// 排查方法: 若明确需要创建相同的会议,可在创建会议请求包中设置"skip_duplicate_check":true 跳过重复会议检查 +const ErrCode400302 ErrCode = 400302 + +// ErrCode400303 用户没有权限创建会议 +// +// 排查方法: 可以联系企业管理员在腾讯会议管理端为用户配置创建会议的权限 +const ErrCode400303 ErrCode = 400303 + +// ErrCode511020 问题重复 +// +// 排查方法: - +const ErrCode511020 ErrCode = 511020 + +// ErrCode600001 不合法的sn +// +// 排查方法: sn可能尚未进行登记 +const ErrCode600001 ErrCode = 600001 + +// ErrCode600002 设备已注册 +// +// 排查方法: 可能设备已经建立过长连接 +const ErrCode600002 ErrCode = 600002 + +// ErrCode600003 不合法的硬件activecode +// +// 排查方法: - +const ErrCode600003 ErrCode = 600003 + +// ErrCode600004 该硬件尚未授权任何企业 +// +// 排查方法: - +const ErrCode600004 ErrCode = 600004 + +// ErrCode600005 硬件Secret无效 +// +// 排查方法: - +const ErrCode600005 ErrCode = 600005 + +// ErrCode600006 硬件deviceid无效 +// +// 排查方法: - +const ErrCode600006 ErrCode = 600006 + +// ErrCode600007 缺少硬件sn +// +// 排查方法: - +const ErrCode600007 ErrCode = 600007 // ErrCode600008 缺少nonce参数 // @@ -5338,6 +5519,48 @@ const ErrCode610021 ErrCode = 610021 // 排查方法: - const ErrCode610022 ErrCode = 610022 +// ErrCode610023 企业外部联系人规模已达上限,当前已无法管理客户,在客户端上购买后即可继续管理。 +// +// 排查方法: [去管理后台购买] +// +// [去管理后台购买]: https://work.weixin.qq.com/wework_admin/frame#/business/mall/index/productIntro/customerService +const ErrCode610023 ErrCode = 610023 + +// ErrCode630005 无效的launch_code +// +// 排查方法: - +const ErrCode630005 ErrCode = 630005 + +// ErrCode630010 不合法的sdk_func +// +// 排查方法: - +const ErrCode630010 ErrCode = 630010 + +// ErrCode630011 不合法的singlechat参数 +// +// 排查方法: - +const ErrCode630011 ErrCode = 630011 + +// ErrCode630012 操作者身份不一致 +// +// 排查方法: - +const ErrCode630012 ErrCode = 630012 + +// ErrCode630013 launch_code中应用身份跟调用sdk接口应用身份不一致 +// +// 排查方法: - +const ErrCode630013 ErrCode = 630013 + +// ErrCode630014 launch_code中申请的sdk接口跟调用sdk接口不一致 +// +// 排查方法: - +const ErrCode630014 ErrCode = 630014 + +// ErrCode630015 单聊对象已离职 +// +// 排查方法: - +const ErrCode630015 ErrCode = 630015 + // ErrCode640001 微盘不存在当前空间 // // 排查方法: 判断spaceid是否填错 @@ -5493,6 +5716,13 @@ const ErrCode640032 ErrCode = 640032 // 排查方法: 升级为付费账号,不受此限制 const ErrCode640035 ErrCode = 640035 +// ErrCode640039 分块上传的size和block_sha不匹配 +// +// 排查方法: 按[此指引]计算并填入正确的block_sha以及对应的size +// +// [此指引]: https://github.com/wecomopen/file_block_digest/tree/main/dem +const ErrCode640039 ErrCode = 640039 + // ErrCode640044 空间已开启保密模式 // // 排查方法: 检查空间相关设置 @@ -5553,270 +5783,1186 @@ const ErrCode640056 ErrCode = 640056 // 排查方法: 清理空间下不再使用的文件 const ErrCode640060 ErrCode = 640060 -// ErrCode680000 参数错误 +// ErrCode640061 智能表api内容权限规则名称重复 // -// 排查方法: 结合返回的errmsg排查 -const ErrCode680000 ErrCode = 680000 +// 排查方法: 这是说明传入的name参数有重复或者name=“全员权限”,这些都是不被允许的,请修改name参数 +const ErrCode640061 ErrCode = 640061 -// ErrCode680001 邮件群组地址非法 +// ErrCode640062 智能表api内容权限规则名称长度超限 // -// 排查方法: 检查邮箱地址格式是否正确,是否为本企业域名 -const ErrCode680001 ErrCode = 680001 +// 排查方法: 这是说明传入的name参数长度超过限制,目前限制的name长度为20个字符 +const ErrCode640062 ErrCode = 640062 -// ErrCode680002 邮件群组名称非法 +// ErrCode640063 智能表api指定成员权限规则数量超限返回 // -// 排查方法: 名称是否为空,名称是否过长 -const ErrCode680002 ErrCode = 680002 +// 排查方法: 这是成员权限规则超过限制,每个文档的额外成员权限规则数量限制为20个 +const ErrCode640063 ErrCode = 640063 -// ErrCode680003 群组成员非法 +// ErrCode640065 智能表api额外指定成员权限不存在 // -// 排查方法: 检查群组成员邮箱格式是否正确 -const ErrCode680003 ErrCode = 680003 +// 排查方法: 传入的规则id不存在,请检查输入的ruleid是否合法 +const ErrCode640065 ErrCode = 640065 -// ErrCode680004 群组中的群组非法 +// ErrCode640067 智能表api删除的成员不存在 // -// 排查方法: 检查群组邮箱格式是否正确,是否为本企业群组 -const ErrCode680004 ErrCode = 680004 +// 排查方法: 删除的成员非法,该成员不在当前的权限成员列表 +const ErrCode640067 ErrCode = 640067 -// ErrCode680006 群组使用权限 +// ErrCode640069 智能表api规则成员数目超限 // -// 排查方法: 仅支持0: 企业成员, 1任何人, 2:组内成员,3:自定义成员 -const ErrCode680006 ErrCode = 680006 +// 排查方法: 智能表额外成员权限规则限制添加的成员人数不得大于500人 +const ErrCode640069 ErrCode = 640069 -// ErrCode680007 允许使用群组成员邮箱非法 +// ErrCode640070 智能表api设置区域权限-全局行规则不能设置局部行规则 // -// 排查方法: 检查群组成员邮箱格式是否正确 -const ErrCode680007 ErrCode = 680007 +// 排查方法: rule_list.priv_list.record_priv.record_range_type=1标识全部记录,则不能再设置rule_list.priv_list.record_priv.record_rule_list和rule_list.priv_list.record_priv.record_rule_list.other_priv +const ErrCode640070 ErrCode = 640070 -// ErrCode680008 群组成员为空 +// ErrCode640071 智能表api设置区域权限-行规则数目非法 // -// 排查方法: 检查userlist/grouplist/department是否都为空 -const ErrCode680008 ErrCode = 680008 +// 排查方法: rule_list.priv_list.record_priv.record_rule_list的长度为0或者超过限制20 +const ErrCode640071 ErrCode = 640071 -// ErrCode680010 邮件群组地址重复 +// ErrCode640072 智能表api设置区域权限-行规则缺少fieldid // -// 排查方法: 检查群组地址在企业内是否已经被用户占用 -const ErrCode680010 ErrCode = 680010 +// 排查方法: rule_list.priv_list.record_priv.record_rule_list的某一项缺少字段id,请检查rule_list.priv_list.record_priv.record_rule_list.field_id +const ErrCode640072 ErrCode = 640072 -// ErrCode680011 邮件群组地址重复 +// ErrCode640073 智能表api设置区域权限-行规则操作类型无需有值 // -// 排查方法: 检查群组地址在企业内是否已经被其他群组占用 -const ErrCode680011 ErrCode = 680011 +// 排查方法: rule_list.priv_list.record_priv.record_rule_list.oper_type的取值等于1-包含自己(人员字段)、6-为空、7-非空时候,rule_list.priv_list.record_priv.record_rule_list.value不能有值 +const ErrCode640073 ErrCode = 640073 -// ErrCode680012 邮件群组不存在 +// ErrCode640074 智能表api设置区域权限-行规则操作类型必须有值 // -// 排查方法: 检查群组地址是否有误,是否存在于本企业 -const ErrCode680012 ErrCode = 680012 +// 排查方法: rule_list.priv_list.record_priv.record_rule_list.oper_type的取值等于2-包含value;3-不包含value;4-等于value;5-不等于时候valuerule_list.priv_list.record_priv.record_rule_list.value必须有值 +const ErrCode640074 ErrCode = 640074 -// ErrCode680015 模糊搜索fuzzy参数非法 +// ErrCode640075 智能表api设置区域权限-行规则操作类型未定义 // -// 排查方法: 检查fuzzy值是否为0或1 -const ErrCode680015 ErrCode = 680015 +// 排查方法: 情况1 +// rule_list.priv_list.record_priv.record_rule_list.oper_type的取值不在[1-7]之间 +// 情况2 +// rule_list.priv_list.record_priv.record_rule_list.field_id = CREATED_USER 但是 rule_list.priv_list.record_priv.record_rule_list.oper_type不等于1-包含自己(人员字段) +// 情况3 +// rule_list.priv_list.record_priv.record_rule_list.field_type为人员列FIELD_TYPE_USER 但是 rule_list.priv_list.record_priv.record_rule_list.oper_type不等于1-包含自己(人员字段) +const ErrCode640075 ErrCode = 640075 -// ErrCode680032 业务邮箱地址非法 +// ErrCode640076 智能表api设置区域权限-行规则其他权限非法 // -// 排查方法: 检查邮箱地址格式是否正确,是否为本企业域名 -const ErrCode680032 ErrCode = 680032 +// 排查方法: 情况1 +// priv_list.record_priv.record_rule_list.other_priv的取值不在[1-2]之间 +// 情况2 +// priv_list.priv设置为3-仅浏览,但是priv_list.record_priv.record_rule_list.other_priv的取值不为2-不可查看 +const ErrCode640076 ErrCode = 640076 -// ErrCode680033 业务邮箱地址重复 +// ErrCode640077 智能表api设置区域权限-行规则类型未定义 // -// 排查方法: 检查业务邮箱地址在企业内是否已经被占用 -const ErrCode680033 ErrCode = 680033 +// 排查方法: priv_list.record_priv.record_range_type的取值不在[1-3]之间 +const ErrCode640077 ErrCode = 640077 -// ErrCode680034 业务邮箱名称非法 +// ErrCode640078 智能表api设置区域权限-全局列规则不能设置局部列规则 // -// 排查方法: 名称是否为空,名称是否过长 -const ErrCode680034 ErrCode = 680034 +// 排查方法: priv_list.field_priv.field_range_type = 1-所有字段,则不能再设置priv_list.field_priv.field_rule_list 和priv_list.field_priv.field_default_rule +const ErrCode640078 ErrCode = 640078 -// ErrCode680035 业务邮箱ID不存在 +// ErrCode640079 智能表api设置区域权限-列规则缺少fieldid // -// 排查方法: 检查id是否存在 -const ErrCode680035 ErrCode = 680035 +// 排查方法: 设置字段规则时,field id为空 +const ErrCode640079 ErrCode = 640079 -// ErrCode680036 业务邮箱ID非法 +// ErrCode640080 智能表api设置区域权限-列规则fieldid重复 // -// 排查方法: 检查id数据类型是否正确,是否传值 -const ErrCode680036 ErrCode = 680036 +// 排查方法: priv_list.field_priv.field_rule_list.field_id重复设置 +const ErrCode640080 ErrCode = 640080 -// ErrCode680037 vid账号余量不足 +// ErrCode640081 智能表api设置区域权限-列规则非法 // -// 排查方法: 检查vid账号数是否用完 -const ErrCode680037 ErrCode = 680037 +// 排查方法: 情况1: +// priv_list.priv的设置级别和priv_list.field_priv.field_rule_list.can_edit +// priv_list.field_priv.field_rule_list.can_insert +// priv_list.field_priv.field_rule_list.can_view +// 之间互相冲突,请校验这些地方是否符合正常逻辑,不要出现矛盾的设置,一般外层权限大于内层权限 +// 情况2: +// 最小权限和列规则的三个can之间冲突 +// 最小权限指的是当priv_list.priv设置为2-可编辑;3-仅浏览时候,最小权限会根据priv_list.can_insert_record的设置为,最小权限为可插入记录,还是最小权限为仅浏览,请检查是否与列规则的三个can之间冲突 +const ErrCode640081 ErrCode = 640081 -// ErrCode680040 业务邮箱名称重复 +// ErrCode640082 智能表api设置区域权限-列规则最小权限非法 // -// 排查方法: 检查名称是否已经被其他业务邮箱占用 -const ErrCode680040 ErrCode = 680040 +// 排查方法: 这种情况是因为填充了行规则需要某个字段列,但是列规则里面没有设置这个列的权限,会导致判断字段权限时候缺失 +const ErrCode640082 ErrCode = 640082 -// ErrCode680041 获取用户功能属性type字段非法 +// ErrCode640083 智能表api设置区域权限-列规则默认权限非法 // -// 排查方法: 仅支持1: 强制启用安全登录 2: IMAP/SMTP服务 3: POP/SMTP服务 4: 是否启用安全登录 -const ErrCode680041 ErrCode = 680041 +// 排查方法: 全员权限不能设置priv_list.field_priv.field_default_rule +// 额外成员权限必须设置priv_list.field_priv.field_default_rule +const ErrCode640083 ErrCode = 640083 -// ErrCode680042 更改用户功能属性type字段非法 +// ErrCode640084 智能表api设置区域权限-列规则can相关操作权限非法 // -// 排查方法: 仅支持1: 强制启用安全登录 2: IMAP/SMTP服务 3: POP/SMTP服务 4: 是否启用安全登录 -const ErrCode680042 ErrCode = 680042 +// 排查方法: priv_list.field_priv.field_default_rule的can操作之间相冲突或者和外层的priv_list.priv设置级别冲突 +const ErrCode640084 ErrCode = 640084 -// ErrCode680043 禁用/启用邮箱时type参数非法 +// ErrCode640085 智能表api设置区域权限-列规则类型未定义 // -// 排查方法: 仅支持 1:启用,2:禁用 -const ErrCode680043 ErrCode = 680043 +// 排查方法: priv_list.record_priv.record_range_type的取值不在[1-3]之间 +const ErrCode640085 ErrCode = 640085 -// ErrCode680044 不允许禁用超级管理员、企业创建者 +// ErrCode640086 智能表api设置区域权限-子表id为空 // -// 排查方法: 检查userid是否为超级管理员或企业创建者 -const ErrCode680044 ErrCode = 680044 +// 排查方法: 检查priv_list.sheet_id是否为空 +const ErrCode640086 ErrCode = 640086 -// ErrCode680045 无法禁用已关闭的邮箱 +// ErrCode640087 智能表api设置区域权限-子表id重复 // -// 排查方法: 检查邮箱账号是否为关闭 -const ErrCode680045 ErrCode = 680045 +// 排查方法: 检查priv_list.sheet_id是否重复 +const ErrCode640087 ErrCode = 640087 -// ErrCode680046 启用邮箱数量达到最大限制 +// ErrCode640088 智能表api设置区域权限-子表priv非法 // -// 排查方法: 检查企业中已启用的邮箱数量 -const ErrCode680046 ErrCode = 680046 +// 排查方法: 情况1 +// priv_list.priv设置为1-全部权限和4-无权限时,不能设置同级别的其他字段,包括field_priv和record_priv +// 情况2 +// priv_list.priv设置为2-可编辑,必须有field_priv和record_priv以及can操作 +// 情况3 +// priv_list.priv设置为3-仅浏览,必须有field_priv和record_priv,但是不能有can操作 +const ErrCode640088 ErrCode = 640088 -// ErrCode680106 当前企业会议应用已关闭,音视频会议不可用,请联系管理员 +// ErrCode640089 智能表api设置区域权限-子表priv.priv类型非法 // -// 排查方法: - -const ErrCode680106 ErrCode = 680106 +// 排查方法: priv_list.priv的取值不在[1-4]之间 +const ErrCode640089 ErrCode = 640089 -// ErrCode740000 安全网关gateway_info的冲突 +// ErrCode640090 智能表api设置区域权限-成员类型非法 // -// 排查方法: 企业内唯一 -const ErrCode740000 ErrCode = 740000 +// 排查方法: 修改额外权限的成员列表时,输入的成员id类型不合法,请检查输入的成员类型是否匹配对应的入参列表 +const ErrCode640090 ErrCode = 640090 -// ErrCode740001 安全网关target_info的path冲突 +// ErrCode640091 智能表api设置区域权限-成员重复 // -// 排查方法: 企业内path唯一 -const ErrCode740001 ErrCode = 740001 +// 排查方法: 修改额外权限的成员列表时,输入的成员id重复 +const ErrCode640091 ErrCode = 640091 -// ErrCode740002 安全网关数量超过上限 +// ErrCode640092 智能表api设置区域权限-成员非法 // -// 排查方法: 企业内最多10个 -const ErrCode740002 ErrCode = 740002 +// 排查方法: 删除成员列表的成员id在当前权限的成员列表中不存在 +const ErrCode640092 ErrCode = 640092 -// ErrCode740003 单个安全网关内的path数量超过限制 +// ErrCode640093 智能表api设置列类型list为空 // -// 排查方法: 单个网关内最多100个 -const ErrCode740003 ErrCode = 740003 +// 排查方法: 设置列权限为部分字段可编辑时,没有传入具体字段 +// priv_list.field_priv.field_range_type=2-部分字段时,没设置priv_list.field_priv.field_rule_list +const ErrCode640093 ErrCode = 640093 -// ErrCode740004 安全网关不存在 +// ErrCode640094 智能表api全员权限不能设置名称 // -// 排查方法: 可能已被删除 -const ErrCode740004 ErrCode = 740004 +// 排查方法: 全员权限不能修改名称 +const ErrCode640094 ErrCode = 640094 -// ErrCode740005 安全网关gateway_info的host非域名 +// ErrCode640095 智能表api创建者列类型非法 // -// 排查方法: 目前要求必须是域名,不能配置ip -const ErrCode740005 ErrCode = 740005 +// 排查方法: 设置记录权限时,若priv_list.record_priv.record_rule_list.field_id=CREATED_USER +// 则不能设置 +// priv_list.record_priv.record_rule_list.field_type字段 +const ErrCode640095 ErrCode = 640095 -// ErrCode740006 安全网关gateway_info的host验证失败 +// ErrCode640096 智能表api列类型非法 // -// 排查方法: 要求域名ICP备案跟企业主体一致 -const ErrCode740006 ErrCode = 740006 +// 排查方法: 设置记录权限时,缺失 +// priv_list.record_priv.record_rule_list.field_type字段 +// 或者是列类型不在["FIELD_TYPE_USER", "FIELD_TYPE_SELECT", "FIELD_TYPE_SINGLE_SELECT", "FIELD_TYPE_LOOKUP"]之间 +// 设置字段权限时,缺失 +// priv_list.field_priv.field_rule_list.field_type字段 +const ErrCode640096 ErrCode = 640096 -// ErrCode770001 高级功能额度不足 +// ErrCode640097 智能表api表格id非法 // -// 排查方法: - -const ErrCode770001 ErrCode = 770001 +// 排查方法: 输入的rule_list.priv_list.sheet_id子表id不存在,请校验子表id +const ErrCode640097 ErrCode = 640097 -// ErrCode770003 高级功能全企业购买模式不允许分配和撤销高级功能账户 +// ErrCode640098 智能表api表格日期数字文件列设置错误 // -// 排查方法: - -const ErrCode770003 ErrCode = 770003 +// 排查方法: 日期、数字和文件列这3个规则联动,不存在只勾可编辑+可查看 +const ErrCode640098 ErrCode = 640098 -// ErrCode770004 不存在合法的用户列表 +// ErrCode640100 智能表api表格引用列设置错误 // -// 排查方法: - -const ErrCode770004 ErrCode = 770004 +// 排查方法: 引用、公式不可编辑,可以不可查看 +const ErrCode640100 ErrCode = 640100 -// ErrCode770005 未开通业务高级功能 +// ErrCode640101 智能表api表格系统属性列设置错误 // -// 排查方法: - -const ErrCode770005 ErrCode = 770005 +// 排查方法: 系统字段不可编辑,最小可查看 +// 系统字段指的是创建人、修改人、创建时间和修改时间这四个字段 +const ErrCode640101 ErrCode = 640101 -// ErrCode770006 不合法的jobid +// ErrCode660001 无效的商户号 // -// 排查方法: - -const ErrCode770006 ErrCode = 770006 +// 排查方法: 请检查商户号是否正确 +const ErrCode660001 ErrCode = 660001 -// ErrCode770007 任务正在处理中 +// ErrCode660002 无效的企业收款人id // -// 排查方法: - -const ErrCode770007 ErrCode = 770007 +// 排查方法: 请检查payee_userid是否正确 +const ErrCode660002 ErrCode = 660002 -// ErrCode770008 存在用户账户分配高级功能超过7天,不允许撤销 +// ErrCode660003 userid不在应用的可见范围 // // 排查方法: - -const ErrCode770008 ErrCode = 770008 +const ErrCode660003 ErrCode = 660003 -// ErrCode770009 请求中所有合法用户账户均是高级功能账户 +// ErrCode660004 partyid不在应用的可见范围 // // 排查方法: - -const ErrCode770009 ErrCode = 770009 +const ErrCode660004 ErrCode = 660004 -// ErrCode770010 已在腾讯会议侧购买高级功能,不允许通过此接口操作 +// ErrCode660005 tagid不在应用的可见范围 // // 排查方法: - -const ErrCode770010 ErrCode = 770010 +const ErrCode660005 ErrCode = 660005 -// ErrCode842002 代开发应用模版未上线 +// ErrCode660006 找不到该商户号 // // 排查方法: - -const ErrCode842002 ErrCode = 842002 +const ErrCode660006 ErrCode = 660006 -// ErrCode842003 不是代开发应用模版 +// ErrCode660007 申请已经存在 // -// 排查方法: - -const ErrCode842003 ErrCode = 842003 +// 排查方法: 不需要重复申请 +const ErrCode660007 ErrCode = 660007 -// ErrCode842004 代开发应用模版数量不合法 +// ErrCode660008 商户号已经绑定 // -// 排查方法: - -const ErrCode842004 ErrCode = 842004 +// 排查方法: 不需要重新提交申请 +const ErrCode660008 ErrCode = 660008 -// ErrCode842005 不支持的应用类型 +// ErrCode660009 商户号主体和商户主体不一致 // -// 排查方法: 检查应用类型是否与文档说明一致 -const ErrCode842005 ErrCode = 842005 +// 排查方法: - +const ErrCode660009 ErrCode = 660009 -// ErrCode842006 已存在代开发应用授权 +// ErrCode660010 超过商户号绑定数量限制 // -// 排查方法: -const ErrCode842006 ErrCode = 842006 +// 排查方法: - +const ErrCode660010 ErrCode = 660010 -// ErrCode844001 非法的output_file_format +// ErrCode660011 商户号未绑定 // -// 排查方法: 判断输出文件格式是否正确 -const ErrCode844001 ErrCode = 844001 +// 排查方法: - +const ErrCode660011 ErrCode = 660011 -// ErrCode844002 最近安装应用时间已超过7天,不再允许拨打公费电话联系管理员 +// ErrCode660012 无效的paymentid // -// 排查方法: 请检查最近一次安装应用时间是否超过7天 -const ErrCode844002 ErrCode = 844002 +// 排查方法: - +const ErrCode660012 ErrCode = 660012 -// ErrCode845001 openid账号类型不是公众号或小程序 +// ErrCode660013 对外收款系统应用被关闭了 // // 排查方法: - -const ErrCode845001 ErrCode = 845001 +const ErrCode660013 ErrCode = 660013 -// ErrCode845002 openid认证主体和企业认证主体不一致 +// ErrCode660014 接口已废弃 +// +// 排查方法: 请前往企业微信管理后台-应用管理-对外收款中创建/删除商户号 +const ErrCode660014 ErrCode = 660014 + +// ErrCode670001 应用不在共享范围 +// +// 排查方法: [查看帮助] +// +// [查看帮助]: https://developer.work.weixin.qq.com/document/path/90313#%E9%94%99%E8%AF%AF%E7%A0%81%EF%BC%9A670001 +const ErrCode670001 ErrCode = 670001 + +// ErrCode670002 无效上下游chain_id +// +// 排查方法: - +const ErrCode670002 ErrCode = 670002 + +// ErrCode670003 无效上下游分组id +// +// 排查方法: - +const ErrCode670003 ErrCode = 670003 + +// ErrCode670004 企业不在上下游范围内 +// +// 排查方法: - +const ErrCode670004 ErrCode = 670004 + +// ErrCode670005 超过上下游人企业数上限 +// +// 排查方法: - +const ErrCode670005 ErrCode = 670005 + +// ErrCode670006 无效上下游规则id +// +// 排查方法: - +const ErrCode670006 ErrCode = 670006 + +// ErrCode670007 上下游规则id数量超出限制 +// +// 排查方法: - +const ErrCode670007 ErrCode = 670007 + +// ErrCode670008 分组不唯一 +// +// 排查方法: - +const ErrCode670008 ErrCode = 670008 + +// ErrCode670009 自定义id不唯一 +// +// 排查方法: - +const ErrCode670009 ErrCode = 670009 + +// ErrCode670010 负责人数量超出限制 +// +// 排查方法: - +const ErrCode670010 ErrCode = 670010 + +// ErrCode670011 不合法的自定义id。上下游企业自定义id只支持64个字符以内的字母和数字 +// +// 排查方法: - +const ErrCode670011 ErrCode = 670011 + +// ErrCode670012 导入企业名称为空 +// +// 排查方法: - +const ErrCode670012 ErrCode = 670012 + +// ErrCode670013 不合法的企业名称。企业名只支持30个字符以内的中/英文、数字、合法字符 +// +// 排查方法: - +const ErrCode670013 ErrCode = 670013 + +// ErrCode670014 上下游联系人姓名为空 +// +// 排查方法: - +const ErrCode670014 ErrCode = 670014 + +// ErrCode670015 不合法的上下游联系人姓名 +// +// 排查方法: - +const ErrCode670015 ErrCode = 670015 + +// ErrCode670016 不合法的身份字段。身份字段只支持填写负责人或成员 +// +// 排查方法: - +const ErrCode670016 ErrCode = 670016 + +// ErrCode670017 分组名和同层级企业名重复 +// +// 排查方法: - +const ErrCode670017 ErrCode = 670017 + +// ErrCode670018 该联系人账号异常,无法邀请其加入上下游 +// +// 排查方法: - +const ErrCode670018 ErrCode = 670018 + +// ErrCode670019 导入上下游后单个企业人数超出限制 +// +// 排查方法: - +const ErrCode670019 ErrCode = 670019 + +// ErrCode670020 分组层级不可超过9层 +// +// 排查方法: - +const ErrCode670020 ErrCode = 670020 + +// ErrCode670021 不合法的分组名称 +// +// 排查方法: - +const ErrCode670021 ErrCode = 670021 + +// ErrCode670022 有导入任务正在进行 +// +// 排查方法: - +const ErrCode670022 ErrCode = 670022 + +// ErrCode670023 超过每日导入人数限制 +// +// 排查方法: - +const ErrCode670023 ErrCode = 670023 + +// ErrCode670024 账号异常,不能进行导入 +// +// 排查方法: - +const ErrCode670024 ErrCode = 670024 + +// ErrCode670025 导入数据超出限制。检查导入数据单个企业人数、企业数以及总人数是否超出限制 +// +// 排查方法: - +const ErrCode670025 ErrCode = 670025 + +// ErrCode670026 上下游空间加入企业超出限制 +// +// 排查方法: - +const ErrCode670026 ErrCode = 670026 + +// ErrCode670027 不可以移除上下游创建者 +// +// 排查方法: - +const ErrCode670027 ErrCode = 670027 + +// ErrCode670028 企业名称不唯一 +// +// 排查方法: - +const ErrCode670028 ErrCode = 670028 + +// ErrCode670029 成员、部门不在上下游范围 +// +// 排查方法: - +const ErrCode670029 ErrCode = 670029 + +// ErrCode670030 无权限操作此groupid。检查groupid是否在应用共享范围内 +// +// 排查方法: - +const ErrCode670030 ErrCode = 670030 + +// ErrCode670031 根据管理员设置,存在联系人无权加入其他企业创建的上下游 +// +// 排查方法: - +const ErrCode670031 ErrCode = 670031 + +// ErrCode670032 成员自定义id不合法 +// +// 排查方法: - +const ErrCode670032 ErrCode = 670032 + +// ErrCode670033 当前成员填写了多个自定义id +// +// 排查方法: - +const ErrCode670033 ErrCode = 670033 + +// ErrCode670034 成员自定义id跟当前下游企业其他成员重复 +// +// 排查方法: - +const ErrCode670034 ErrCode = 670034 + +// ErrCode670035 成员没有设置自定义id +// +// 排查方法: - +const ErrCode670035 ErrCode = 670035 + +// ErrCode680000 参数错误 +// +// 排查方法: 结合返回的errmsg排查 +const ErrCode680000 ErrCode = 680000 + +// ErrCode680001 邮件群组地址非法 +// +// 排查方法: 检查邮箱地址格式是否正确,是否为本企业域名 +const ErrCode680001 ErrCode = 680001 + +// ErrCode680002 邮件群组名称非法 +// +// 排查方法: 名称是否为空,名称是否过长 +const ErrCode680002 ErrCode = 680002 + +// ErrCode680003 群组成员非法 +// +// 排查方法: 检查群组成员邮箱格式是否正确 +const ErrCode680003 ErrCode = 680003 + +// ErrCode680004 群组中的群组非法 +// +// 排查方法: 检查群组邮箱格式是否正确,是否为本企业群组 +const ErrCode680004 ErrCode = 680004 + +// ErrCode680006 群组使用权限 +// +// 排查方法: 仅支持0: 企业成员, 1任何人, 2:组内成员,3:自定义成员 +const ErrCode680006 ErrCode = 680006 + +// ErrCode680007 允许使用群组成员邮箱非法 +// +// 排查方法: 检查群组成员邮箱格式是否正确 +const ErrCode680007 ErrCode = 680007 + +// ErrCode680008 群组成员为空 +// +// 排查方法: 检查userlist/grouplist/department是否都为空 +const ErrCode680008 ErrCode = 680008 + +// ErrCode680010 邮件群组地址重复 +// +// 排查方法: 检查群组地址在企业内是否已经被用户占用 +const ErrCode680010 ErrCode = 680010 + +// ErrCode680011 邮件群组地址重复 +// +// 排查方法: 检查群组地址在企业内是否已经被其他群组占用 +const ErrCode680011 ErrCode = 680011 + +// ErrCode680012 邮件群组不存在 +// +// 排查方法: 检查群组地址是否有误,是否存在于本企业 +const ErrCode680012 ErrCode = 680012 + +// ErrCode680015 模糊搜索fuzzy参数非法 +// +// 排查方法: 检查fuzzy值是否为0或1 +const ErrCode680015 ErrCode = 680015 + +// ErrCode680032 业务邮箱地址非法 +// +// 排查方法: 检查邮箱地址格式是否正确,是否为本企业域名 +const ErrCode680032 ErrCode = 680032 + +// ErrCode680033 业务邮箱地址重复 +// +// 排查方法: 检查业务邮箱地址在企业内是否已经被占用 +const ErrCode680033 ErrCode = 680033 + +// ErrCode680034 业务邮箱名称非法 +// +// 排查方法: 名称是否为空,名称是否过长 +const ErrCode680034 ErrCode = 680034 + +// ErrCode680035 业务邮箱ID不存在 +// +// 排查方法: 检查id是否存在 +const ErrCode680035 ErrCode = 680035 + +// ErrCode680036 业务邮箱ID非法 +// +// 排查方法: 检查id数据类型是否正确,是否传值 +const ErrCode680036 ErrCode = 680036 + +// ErrCode680037 vid账号余量不足 +// +// 排查方法: 检查vid账号数是否用完 +const ErrCode680037 ErrCode = 680037 + +// ErrCode680040 业务邮箱名称重复 +// +// 排查方法: 检查名称是否已经被其他业务邮箱占用 +const ErrCode680040 ErrCode = 680040 + +// ErrCode680041 获取用户功能属性type字段非法 +// +// 排查方法: 仅支持1: 强制启用安全登录 2: IMAP/SMTP服务 3: POP/SMTP服务 4: 是否启用安全登录 +const ErrCode680041 ErrCode = 680041 + +// ErrCode680042 更改用户功能属性type字段非法 +// +// 排查方法: 仅支持1: 强制启用安全登录 2: IMAP/SMTP服务 3: POP/SMTP服务 4: 是否启用安全登录 +const ErrCode680042 ErrCode = 680042 + +// ErrCode680043 禁用/启用邮箱时type参数非法 +// +// 排查方法: 仅支持 1:启用,2:禁用 +const ErrCode680043 ErrCode = 680043 + +// ErrCode680044 不允许禁用超级管理员、企业创建者 +// +// 排查方法: 检查userid是否为超级管理员或企业创建者 +const ErrCode680044 ErrCode = 680044 + +// ErrCode680045 无法禁用已关闭的邮箱 +// +// 排查方法: 检查邮箱账号是否为关闭 +const ErrCode680045 ErrCode = 680045 + +// ErrCode680046 启用邮箱数量达到最大限制 +// +// 排查方法: 检查企业中已启用的邮箱数量 +const ErrCode680046 ErrCode = 680046 + +// ErrCode680106 当前企业会议应用已关闭,音视频会议不可用,请联系管理员 +// +// 排查方法: - +const ErrCode680106 ErrCode = 680106 + +// ErrCode680151 客户端专用密码id不正确 +// +// 排查方法: - +const ErrCode680151 ErrCode = 680151 + +// ErrCode680153 客户端专用密码个数超过上限 +// +// 排查方法: - +const ErrCode680153 ErrCode = 680153 + +// ErrCode701001 不是license基础账号 +// +// 排查方法: - +const ErrCode701001 ErrCode = 701001 + +// ErrCode701002 不合法的license账号 +// +// 排查方法: - +const ErrCode701002 ErrCode = 701002 + +// ErrCode701003 激活码已绑定 +// +// 排查方法: - +const ErrCode701003 ErrCode = 701003 + +// ErrCode701004 用户未激活该类型激活码,不允许续期 +// +// 排查方法: - +const ErrCode701004 ErrCode = 701004 + +// ErrCode701005 无效的license订单 +// +// 排查方法: - +const ErrCode701005 ErrCode = 701005 + +// ErrCode701006 不合法的license账号类型 +// +// 排查方法: - +const ErrCode701006 ErrCode = 701006 + +// ErrCode701007 不合法的账号类型 +// +// 排查方法: - +const ErrCode701007 ErrCode = 701007 + +// ErrCode701008 没有合法的有互通license的用户 +// +// 排查方法: 该userid没有[激活互通账号],请[激活]后重试 +// +// [激活互通账号]: https://developer.work.weixin.qq.com/document/path/90313#37638 +// [激活]: https://developer.work.weixin.qq.com/document/path/90313#37638 +const ErrCode701008 ErrCode = 701008 + +// ErrCode701009 灰度期间,month只能为1个月 +// +// 排查方法: - +const ErrCode701009 ErrCode = 701009 + +// ErrCode701010 所有的account_code都非法 +// +// 排查方法: - +const ErrCode701010 ErrCode = 701010 + +// ErrCode701011 userid已经绑定 +// +// 排查方法: - +const ErrCode701011 ErrCode = 701011 + +// ErrCode701012 active_code 超过绑定有效期 +// +// 排查方法: - +const ErrCode701012 ErrCode = 701012 + +// ErrCode701013 灰度期间只允许续期一次 +// +// 排查方法: - +const ErrCode701013 ErrCode = 701013 + +// ErrCode701014 jobid最多关联100w个userid +// +// 排查方法: - +const ErrCode701014 ErrCode = 701014 + +// ErrCode701015 没有第三方或者代开发授权,不允许下单 +// +// 排查方法: - +const ErrCode701015 ErrCode = 701015 + +// ErrCode701016 账号未激活或者已经过期 +// +// 排查方法: - +const ErrCode701016 ErrCode = 701016 + +// ErrCode701017 账号30天内迁移过 +// +// 排查方法: - +const ErrCode701017 ErrCode = 701017 + +// ErrCode701018 接收账号已有相同类型的账号且剩余有效时长超过20天 +// +// 排查方法: - +const ErrCode701018 ErrCode = 701018 + +// ErrCode701019 用户userid非法或者跨企业 +// +// 排查方法: - +const ErrCode701019 ErrCode = 701019 + +// ErrCode701020 有重复的userid +// +// 排查方法: - +const ErrCode701020 ErrCode = 701020 + +// ErrCode701021 非法的激活码 +// +// 排查方法: - +const ErrCode701021 ErrCode = 701021 + +// ErrCode701022 激活码还在生成中,稍后再试 +// +// 排查方法: - +const ErrCode701022 ErrCode = 701022 + +// ErrCode701023 有重复的激活码 +// +// 排查方法: - +const ErrCode701023 ErrCode = 701023 + +// ErrCode701024 批量操作全部失败了 +// +// 排查方法: - +const ErrCode701024 ErrCode = 701024 + +// ErrCode701025 批量操作传了空列表 +// +// 排查方法: - +const ErrCode701025 ErrCode = 701025 + +// ErrCode701026 列表数量超过最大值 +// +// 排查方法: - +const ErrCode701026 ErrCode = 701026 + +// ErrCode701027 测试企业购买账号个数超限。 +// +// 排查方法: - +const ErrCode701027 ErrCode = 701027 + +// ErrCode701028 测试企业购买月份超限,最多只能购买一个月 +// +// 排查方法: - +const ErrCode701028 ErrCode = 701028 + +// ErrCode701029 测试企业只允许续期一次 +// +// 排查方法: - +const ErrCode701029 ErrCode = 701029 + +// ErrCode701030 新激活码有效期累加用户绑定的旧激活码有效期超过5年 +// +// 排查方法: - +const ErrCode701030 ErrCode = 701030 + +// ErrCode701031 有订单在迁移中,请迁移完成后再下单 +// +// 排查方法: - +const ErrCode701031 ErrCode = 701031 + +// ErrCode701032 有订单未支付,请完成后再下单 +// +// 排查方法: - +const ErrCode701032 ErrCode = 701032 + +// ErrCode701033 有订单正在生成激活码中,请稍后重试 +// +// 排查方法: - +const ErrCode701033 ErrCode = 701033 + +// ErrCode701034 历史企业,需迁移完成后才能购买license订单,可以去服务商管理端购买license订单页面点击主动迁移 +// +// 排查方法: - +const ErrCode701034 ErrCode = 701034 + +// ErrCode701035 有正式订单,所以无法添加测试订单 +// +// 排查方法: - +const ErrCode701035 ErrCode = 701035 + +// ErrCode701036 有生效中的测试订单,所以无法添加订单 +// +// 排查方法: - +const ErrCode701036 ErrCode = 701036 + +// ErrCode701037 存在订单申请退款中 +// +// 排查方法: - +const ErrCode701037 ErrCode = 701037 + +// ErrCode701038 民生企业,只允许下单12个月 +// +// 排查方法: - +const ErrCode701038 ErrCode = 701038 + +// ErrCode701039 民生企业,不允许续期 +// +// 排查方法: - +const ErrCode701039 ErrCode = 701039 + +// ErrCode701040 民生企业,不允许购买数量超过某个限制 +// +// 排查方法: - +const ErrCode701040 ErrCode = 701040 + +// ErrCode701051 没有共享应用给下游企业 +// +// 排查方法: - +const ErrCode701051 ErrCode = 701051 + +// ErrCode701054 激活码分享自上游企业 +// +// 排查方法: - +const ErrCode701054 ErrCode = 701054 + +// ErrCode701055 激活码分享给了下游企业 +// +// 排查方法: - +const ErrCode701055 ErrCode = 701055 + +// ErrCode701056 总分享激活码数超上下游通讯录人数2倍 +// +// 排查方法: - +const ErrCode701056 ErrCode = 701056 + +// ErrCode701057 服务商没有授权上游企业 +// +// 排查方法: - +const ErrCode701057 ErrCode = 701057 + +// ErrCode701058 来源企业和目标企业没有上下游关系 +// +// 排查方法: - +const ErrCode701058 ErrCode = 701058 + +// ErrCode701063 企业接口许可状态已关闭 +// +// 排查方法: - +const ErrCode701063 ErrCode = 701063 + +// ErrCode701070 无效的自动激活状态 +// +// 排查方法: - +const ErrCode701070 ErrCode = 701070 + +// ErrCode701071 从未为授权企业购买过接口许可 +// +// 排查方法: - +const ErrCode701071 ErrCode = 701071 + +// ErrCode701081 更新激活码的时候写冲突,请获取激活码最新详情再根据激活码最新情况处理 +// +// 排查方法: - +const ErrCode701081 ErrCode = 701081 + +// ErrCode701082 该用户已经激活的情况下,使用新码重新激活的场景,旧码剩余的时长不能超过20天 +// +// 排查方法: - +const ErrCode701082 ErrCode = 701082 + +// ErrCode701083 订单未支付 +// +// 排查方法: - +const ErrCode701083 ErrCode = 701083 + +// ErrCode701084 订单不是未支付 +// +// 排查方法: - +const ErrCode701084 ErrCode = 701084 + +// ErrCode701085 订单无法操作,请稍后再试 +// +// 排查方法: - +const ErrCode701085 ErrCode = 701085 + +// ErrCode701086 订单不属于该企业 +// +// 排查方法: - +const ErrCode701086 ErrCode = 701086 + +// ErrCode701087 授权企业没有安装任何互通权限应用(「客户联系」或「微信客服」权限) +// +// 排查方法: - +const ErrCode701087 ErrCode = 701087 + +// ErrCode701088 用户不在服务商应用的可见范围内 +// +// 排查方法: - +const ErrCode701088 ErrCode = 701088 + +// ErrCode701089 用户不在服务商互通权限(「客户联系」或「微信客服」权限)应用的可见范围内 +// +// 排查方法: - +const ErrCode701089 ErrCode = 701089 + +// ErrCode701090 续期订单中全部账号的续期天数都等于0 +// +// 排查方法: - +const ErrCode701090 ErrCode = 701090 + +// ErrCode701099 用户没有有效的接口许可 +// +// 排查方法: [接口许可失效的表现],参考该文档排查是否全部待检查用户都有有效的接口许可 +// +// [接口许可失效的表现]: https://developer.work.weixin.qq.com/document/path/90313#38220 +const ErrCode701099 ErrCode = 701099 + +// ErrCode701100 时间戳不合法 +// +// 排查方法: 开始时间必须小于结束时间;时间范围不能超过14天;非微盘专业版的企业只能查询90天内的数据 +const ErrCode701100 ErrCode = 701100 + +// ErrCode701101 limit大小超过上限1000 // -// 排查方法: 请确保小程序或公众号已经认证,且认证的主体名称与企业的主体名称一致 -const ErrCode845002 ErrCode = 845002 +// 排查方法: - +const ErrCode701101 ErrCode = 701101 -// ErrCode845003 unionid认证主体和企业认证主体不一致 +// ErrCode701102 查询用户数超过上限100 // -// 排查方法: 请确保开放平台账号已经认证,且认证的主体名称与企业的主体名称一致 -const ErrCode845003 ErrCode = 845003 +// 排查方法: - +const ErrCode701102 ErrCode = 701102 -// ErrCode846000 不是代开发或者第三方应用 +// ErrCode701103 操作类型不合法 // -// 排查方法: -const ErrCode846000 ErrCode = 846000 +// 排查方法: - +const ErrCode701103 ErrCode = 701103 + +// ErrCode701104 操作来源不合法 +// +// 排查方法: - +const ErrCode701104 ErrCode = 701104 + +// ErrCode701105 cursor不合法 +// +// 排查方法: 检查是否企业微信返回的cursor +const ErrCode701105 ErrCode = 701105 + +// ErrCode701107 用户不在文档内容存档范围或者不在应用可见范围 +// +// 排查方法: - +const ErrCode701107 ErrCode = 701107 + +// ErrCode701108 docid不合法 +// +// 排查方法: - +const ErrCode701108 ErrCode = 701108 + +// ErrCode701109 导出格式不合法 +// +// 排查方法: - +const ErrCode701109 ErrCode = 701109 + +// ErrCode701112 民生行业优惠政策已到期 +// +// 排查方法: - +const ErrCode701112 ErrCode = 701112 + +// ErrCode701120 该接口不支持传父订单id +// +// 排查方法: - +const ErrCode701120 ErrCode = 701120 + +// ErrCode701121 测试企业不允许调用多企业下单接口 +// +// 排查方法: - +const ErrCode701121 ErrCode = 701121 + +// ErrCode701122 多企业下单接口全部企业无效 +// +// 排查方法: - +const ErrCode701122 ErrCode = 701122 + +// ErrCode701123 多企业下单接口每个jobid最多关联10万个企业 +// +// 排查方法: - +const ErrCode701123 ErrCode = 701123 + +// ErrCode701124 corpid重复 +// +// 排查方法: - +const ErrCode701124 ErrCode = 701124 + +// ErrCode701125 jobid未提交 +// +// 排查方法: - +const ErrCode701125 ErrCode = 701125 + +// ErrCode701126 jobid已提交 +// +// 排查方法: - +const ErrCode701126 ErrCode = 701126 + +// ErrCode701127 客户非测试企业,不能添加测试订单 +// +// 排查方法: - +const ErrCode701127 ErrCode = 701127 + +// ErrCode701128 客户是测试企业,不能添加非测试订单 +// +// 排查方法: - +const ErrCode701128 ErrCode = 701128 + +// ErrCode701129 企业下无服务商的应用订单 +// +// 排查方法: - +const ErrCode701129 ErrCode = 701129 + +// ErrCode701130 企业下服务商应用订单均已过期 +// +// 排查方法: - +const ErrCode701130 ErrCode = 701130 + +// ErrCode701131 无应用订单,处于免费试用状态,但购买账号码数超过免费试用的人数上限 +// +// 排查方法: - +const ErrCode701131 ErrCode = 701131 + +// ErrCode701132 购买时长不大于3个月,购买账号数不允许超过通讯录人数的2倍 +// +// 排查方法: - +const ErrCode701132 ErrCode = 701132 + +// ErrCode701133 无应用订单,处于免费试用状态,购买时长不允许超过3个月(93天) +// +// 排查方法: - +const ErrCode701133 ErrCode = 701133 + +// ErrCode701134 操作过于频繁,请稍后再试 +// +// 排查方法: - +const ErrCode701134 ErrCode = 701134 + +// ErrCode701135 接口许可购买时长不可低于应用订单时长 +// +// 排查方法: - +const ErrCode701135 ErrCode = 701135 + +// ErrCode701139 未授权会话存档应用,无法创建会话存档订单 +// +// 排查方法: - +const ErrCode701139 ErrCode = 701139 + +// ErrCode701140 已经购买过此版本会话存档账号,不能再新购,只能续期、扩容、升级 +// +// 排查方法: - +const ErrCode701140 ErrCode = 701140 + +// ErrCode701141 未购买此版本会话存档账号或已经过期,不能增购、续期、升级 +// +// 排查方法: - +const ErrCode701141 ErrCode = 701141 + +// ErrCode701142 订单可能被其他并发请求更新,请重试 +// +// 排查方法: - +const ErrCode701142 ErrCode = 701142 + +// ErrCode701143 在未支付或申请退款中的订单,不能下单 +// +// 排查方法: - +const ErrCode701143 ErrCode = 701143 + +// ErrCode701146 海外企业不能购买会话存档 +// +// 排查方法: - +const ErrCode701146 ErrCode = 701146 + +// ErrCode701147 余额支付超过单次支付限额上限 +// +// 排查方法: - +const ErrCode701147 ErrCode = 701147 + +// ErrCode701149 只有临过期60天可以续期 +// +// 排查方法: - +const ErrCode701149 ErrCode = 701149 + +// ErrCode701150 测试企业不支持分配许可 +// +// 排查方法: - +const ErrCode701150 ErrCode = 701150 + +// ErrCode701151 jobid不正确或者已失效 +// +// 排查方法: - +const ErrCode701151 ErrCode = 701151 + +// ErrCode701152 docid不正确或者对应的文档不是公开状态 +// +// 排查方法: - +const ErrCode701152 ErrCode = 701152 + +// ErrCode701153 可查询文档列表的用户已达上限 +// +// 排查方法: - +const ErrCode701153 ErrCode = 701153 + +// ErrCode701154 可导出的文档数量已达上限 +// +// 排查方法: - +const ErrCode701154 ErrCode = 701154 + +// ErrCode701158 不支持的订单类型 +// +// 排查方法: - +const ErrCode701158 ErrCode = 701158 + +// ErrCode701159 不合法的购买人数 +// +// 排查方法: - +const ErrCode701159 ErrCode = 701159 + +// ErrCode701160 存在未通过支付检查的企业 +// +// 排查方法: - +const ErrCode701160 ErrCode = 701160 + +// ErrCode701161 订单已经指定使用微信网银支付 +// +// 排查方法: - +const ErrCode701161 ErrCode = 701161 + +// ErrCode701163 合法的生效时间 +// +// 排查方法: - +const ErrCode701163 ErrCode = 701163 + +// ErrCode701164 不存在可升级的版本 +// +// 排查方法: - +const ErrCode701164 ErrCode = 701164 + +// ErrCode701165 少chat_archive_api字段 +// +// 排查方法: - +const ErrCode701165 ErrCode = 701165 + +// ErrCode701166 操作者没有权限,或者已离职、退出、禁用 +// +// 排查方法: - +const ErrCode701166 ErrCode = 701166 + +// ErrCode701167 购买人数超出上限 +// +// 排查方法: - +const ErrCode701167 ErrCode = 701167 + +// ErrCode701169 只允许取消未支付的订单 +// +// 排查方法: - +const ErrCode701169 ErrCode = 701169 + +// ErrCode701170 群活码第三方限免许可到期 +// +// 排查方法: - +const ErrCode701170 ErrCode = 701170 + +// ErrCode701200 其他镜像发布中,禁止发布 +// +// 排查方法: - +const ErrCode701200 ErrCode = 701200 + +// ErrCode701230 指定的原始的开始或者结束时间有误 +// +// 排查方法: - +const ErrCode701230 ErrCode = 701230 + +// ErrCode701231 存在待生效的版本 +// +// 排查方法: - +const ErrCode701231 ErrCode = 701231 + +// ErrCode701250 时间戳不合法 +// +// 排查方法: 开始时间必须小于结束时间;时间范围不能超过14天。 +const ErrCode701250 ErrCode = 701250 + +// ErrCode701252 cursor不合法 +// +// 排查方法: - +const ErrCode701252 ErrCode = 701252 // ErrCode710000 非法的open_corpid // @@ -5848,815 +6994,882 @@ const ErrCode710006 ErrCode = 710006 // 排查方法: - const ErrCode710007 ErrCode = 710007 -// ErrCode60252 非法的openkfid +// ErrCode710200 不合法的运动步数凭证 +// +// 排查方法: - +const ErrCode710200 ErrCode = 710200 + +// ErrCode710201 用户不允许获取运动步数 +// +// 排查方法: - +const ErrCode710201 ErrCode = 710201 + +// ErrCode710400 硬件云端接入设备model_accesstoken非法 +// +// 排查方法: - +const ErrCode710400 ErrCode = 710400 + +// ErrCode710401 硬件云端接入设备model_accesstoken过期 +// +// 排查方法: model_access_token有时效性,需要重新获取一次 +const ErrCode710401 ErrCode = 710401 + +// ErrCode710402 硬件云端接入设备model_ticket非法 +// +// 排查方法: - +const ErrCode710402 ErrCode = 710402 + +// ErrCode710403 缺少model_access_token参数 +// +// 排查方法: - +const ErrCode710403 ErrCode = 710403 + +// ErrCode710600 消息msgid或者密钥信息不正确 +// +// 排查方法: - +const ErrCode710600 ErrCode = 710600 + +// ErrCode710601 msgid不正确 +// +// 排查方法: - +const ErrCode710601 ErrCode = 710601 + +// ErrCode710602 msgtype不正确 // -// 排查方法: 检查openkfid是否拼写正确 -const ErrCode60252 ErrCode = 60252 +// 排查方法: - +const ErrCode710602 ErrCode = 710602 -// ErrCode60251 缺少openkfid +// ErrCode710603 密钥信息不正确 // // 排查方法: - -const ErrCode60251 ErrCode = 60251 +const ErrCode710603 ErrCode = 710603 -// ErrCode60253 客服不在接待人员列表中 +// ErrCode710605 消息解密失败 // -// 排查方法: 检查传入的客服id是否在接待人员列表中 -const ErrCode60253 ErrCode = 60253 +// 排查方法: 检查msgid和密钥信息是否正确 +const ErrCode710605 ErrCode = 710605 -// ErrCode60257 设置直属上级数量超过最大数量限制(5个) +// ErrCode710606 群ID不在授权范围内 // // 排查方法: - -const ErrCode60257 ErrCode = 60257 +const ErrCode710606 ErrCode = 710606 -// ErrCode301007 企业不可用,可能已经被解散或者被禁封 +// ErrCode710607 部门不在授权范围内 // // 排查方法: - -const ErrCode301007 ErrCode = 301007 +const ErrCode710607 ErrCode = 710607 -// ErrCode701001 不是license基础账号 +// ErrCode710608 用户不在授权范围内 // // 排查方法: - -const ErrCode701001 ErrCode = 701001 +const ErrCode710608 ErrCode = 710608 -// ErrCode701002 不合法的license账号 +// ErrCode710609 外部联系人的跟进人不在授权范围内 // // 排查方法: - -const ErrCode701002 ErrCode = 701002 +const ErrCode710609 ErrCode = 710609 -// ErrCode701003 激活码已绑定 +// ErrCode710610 关键词和关键行为不能同时为空 // // 排查方法: - -const ErrCode701003 ErrCode = 701003 +const ErrCode710610 ErrCode = 710610 -// ErrCode701004 用户未激活该类型激活码,不允许续期 +// ErrCode710611 cursor不正确 // // 排查方法: - -const ErrCode701004 ErrCode = 701004 +const ErrCode710611 ErrCode = 710611 -// ErrCode701005 无效的license订单 +// ErrCode710612 关键词规则ID不存在 // // 排查方法: - -const ErrCode701005 ErrCode = 701005 +const ErrCode710612 ErrCode = 710612 -// ErrCode701006 不合法的license账号类型 +// ErrCode710613 msgid重复 // // 排查方法: - -const ErrCode701006 ErrCode = 701006 +const ErrCode710613 ErrCode = 710613 -// ErrCode701007 不合法的账号类型 +// ErrCode710614 群内成员都不在授权范围内 // // 排查方法: - -const ErrCode701007 ErrCode = 701007 +const ErrCode710614 ErrCode = 710614 -// ErrCode701008 没有合法的有互通license的用户 +// ErrCode710615 session_type不正确 // -// 排查方法: 该userid没有[激活互通账号],请[激活]后重试 +// 排查方法: - +const ErrCode710615 ErrCode = 710615 + +// ErrCode710616 提交分析的任务类型不正确 // -// [激活互通账号]: https://developer.work.weixin.qq.com/document/path/90313#37638 -// [激活]: https://developer.work.weixin.qq.com/document/path/90313#37638 -const ErrCode701008 ErrCode = 701008 +// 排查方法: 检查本次提交的任务类型与jobid对应的任务类型是否一致 +const ErrCode710616 ErrCode = 710616 -// ErrCode701009 灰度期间,month只能为1个月 +// ErrCode710617 分析任务已经提交过了 // // 排查方法: - -const ErrCode701009 ErrCode = 701009 +const ErrCode710617 ErrCode = 710617 -// ErrCode701010 所有的account_code都非法 +// ErrCode710618 分析任务还未提交 // // 排查方法: - -const ErrCode701010 ErrCode = 701010 +const ErrCode710618 ErrCode = 710618 -// ErrCode701011 userid已经绑定 +// ErrCode710619 关键词规则数量已经超过上限 // -// 排查方法: - -const ErrCode701011 ErrCode = 701011 +// 排查方法: 上限详见:[关键词规则管理] +// +// [关键词规则管理]: https://developer.work.weixin.qq.com/document/path/90313#97237 +const ErrCode710619 ErrCode = 710619 -// ErrCode701012 active_code 超过绑定有效期 +// ErrCode710620 关键词规则ID不正确 // // 排查方法: - -const ErrCode701012 ErrCode = 701012 +const ErrCode710620 ErrCode = 710620 -// ErrCode701013 灰度期间只允许续期一次 +// ErrCode710621 电话号码格式不正确 // // 排查方法: - -const ErrCode701013 ErrCode = 701013 +const ErrCode710621 ErrCode = 710621 -// ErrCode701014 jobid最多关联100w个userid +// ErrCode710622 银行卡号格式不正确 // // 排查方法: - -const ErrCode701014 ErrCode = 701014 +const ErrCode710622 ErrCode = 710622 -// ErrCode701015 没有第三方或者代开发授权,不允许下单 +// ErrCode710623 单次分析任务的消息数量超过上限 // -// 排查方法: - -const ErrCode701015 ErrCode = 701015 +// 排查方法: 上限详见:[会话内容分析] +// +// [会话内容分析]: https://developer.work.weixin.qq.com/document/path/90313#99527 +const ErrCode710623 ErrCode = 710623 -// ErrCode701016 账号未激活或者已经过期 +// ErrCode710624 不合法的群ID // // 排查方法: - -const ErrCode701016 ErrCode = 701016 +const ErrCode710624 ErrCode = 710624 -// ErrCode701017 账号30天内迁移过 +// ErrCode710625 分析任务类型不正确 // // 排查方法: - -const ErrCode701017 ErrCode = 701017 +const ErrCode710625 ErrCode = 710625 -// ErrCode701018 迁移账号重叠,接收账号已有相同类型的账号 +// ErrCode710626 自定义ID已存在 // // 排查方法: - -const ErrCode701018 ErrCode = 701018 +const ErrCode710626 ErrCode = 710626 -// ErrCode701019 用户userid非法或者跨企业 +// ErrCode710627 空间不足 // // 排查方法: - -const ErrCode701019 ErrCode = 701019 +const ErrCode710627 ErrCode = 710627 -// ErrCode701020 有重复的userid +// ErrCode710628 摘要长度超过限制 // // 排查方法: - -const ErrCode701020 ErrCode = 701020 +const ErrCode710628 ErrCode = 710628 -// ErrCode701021 非法的激活码 +// ErrCode710629 导出消息数量超过上限 // // 排查方法: - -const ErrCode701021 ErrCode = 701021 +const ErrCode710629 ErrCode = 710629 -// ErrCode701022 激活码还在生成中,稍后再试 +// ErrCode710632 未创建过知识集 // // 排查方法: - -const ErrCode701022 ErrCode = 701022 +const ErrCode710632 ErrCode = 710632 -// ErrCode701023 有重复的激活码 +// ErrCode710633 分析任务失败 // // 排查方法: - -const ErrCode701023 ErrCode = 701023 +const ErrCode710633 ErrCode = 710633 -// ErrCode701024 批量操作全部失败了 +// ErrCode710634 分析任务失败 // // 排查方法: - -const ErrCode701024 ErrCode = 701024 +const ErrCode710634 ErrCode = 710634 -// ErrCode701025 批量操作传了空列表 +// ErrCode710635 自有模型未部署 // // 排查方法: - -const ErrCode701025 ErrCode = 701025 +const ErrCode710635 ErrCode = 710635 -// ErrCode701026 列表数量超过最大值 +// ErrCode710636 不合法的能力id // // 排查方法: - -const ErrCode701026 ErrCode = 701026 +const ErrCode710636 ErrCode = 710636 -// ErrCode701027 测试企业购买账号个数超限。 +// ErrCode710637 所有消息均分析失败 // // 排查方法: - -const ErrCode701027 ErrCode = 701027 +const ErrCode710637 ErrCode = 710637 -// ErrCode701028 测试企业购买月份超限,最多只能购买一个月 +// ErrCode710638 调用程序失败 // // 排查方法: - -const ErrCode701028 ErrCode = 701028 +const ErrCode710638 ErrCode = 710638 -// ErrCode701029 测试企业只允许续期一次 +// ErrCode710639 请求的内容或请求结果包含不合适的内容 // // 排查方法: - -const ErrCode701029 ErrCode = 701029 +const ErrCode710639 ErrCode = 710639 -// ErrCode701030 新激活码有效期累加用户绑定的旧激活码有效期超过5年 +// ErrCode710640 不支持的应用类型 // // 排查方法: - -const ErrCode701030 ErrCode = 701030 +const ErrCode710640 ErrCode = 710640 -// ErrCode701031 有订单在迁移中,请迁移完成后再下单 +// ErrCode710641 应用没有数据与智能专区权限 // // 排查方法: - -const ErrCode701031 ErrCode = 701031 +const ErrCode710641 ErrCode = 710641 -// ErrCode701032 有订单未支付,请完成后再下单 +// ErrCode710642 等待程序/模型返回结果中 // // 排查方法: - -const ErrCode701032 ErrCode = 701032 +const ErrCode710642 ErrCode = 710642 -// ErrCode701033 有订单正在生成激活码中,请稍后重试 +// ErrCode710643 应用没有知识集的授权 // // 排查方法: - -const ErrCode701033 ErrCode = 701033 +const ErrCode710643 ErrCode = 710643 -// ErrCode701034 历史企业,需迁移完成后才能购买license订单,可以去服务商管理端购买license订单页面点击主动迁移 +// ErrCode710644 应用没有通用模型的授权 // // 排查方法: - -const ErrCode701034 ErrCode = 701034 +const ErrCode710644 ErrCode = 710644 -// ErrCode701035 有正式订单,所以无法添加测试订单 +// ErrCode710645 程序不存在或状态异常 // // 排查方法: - -const ErrCode701035 ErrCode = 701035 +const ErrCode710645 ErrCode = 710645 -// ErrCode701036 有生效中的测试订单,所以无法添加订单 +// ErrCode710646 不合法的notify_id // // 排查方法: - -const ErrCode701036 ErrCode = 701036 +const ErrCode710646 ErrCode = 710646 -// ErrCode701037 存在订单申请退款中 +// ErrCode710647 输入协议不匹配 // // 排查方法: - -const ErrCode701037 ErrCode = 701037 +const ErrCode710647 ErrCode = 710647 -// ErrCode701038 民生企业,只允许下单12个月 +// ErrCode710648 非法的关键行为值 // // 排查方法: - -const ErrCode701038 ErrCode = 701038 +const ErrCode710648 ErrCode = 710648 -// ErrCode701039 民生企业,不允许续期 +// ErrCode710649 群id数量超过上限 // // 排查方法: - -const ErrCode701039 ErrCode = 701039 +const ErrCode710649 ErrCode = 710649 -// ErrCode701040 民生企业,不允许购买数量超过某个限制 +// ErrCode710650 缺少关键词列表 // // 排查方法: - -const ErrCode701040 ErrCode = 701040 +const ErrCode710650 ErrCode = 710650 -// ErrCode701051 没有共享应用给下游企业 +// ErrCode710651 没有付费版本 // // 排查方法: - -const ErrCode701051 ErrCode = 701051 +const ErrCode710651 ErrCode = 710651 -// ErrCode701054 激活码分享自上游企业 +// ErrCode710652 会话内容存档超过90天,已失效 // // 排查方法: - -const ErrCode701054 ErrCode = 701054 +const ErrCode710652 ErrCode = 710652 -// ErrCode701055 激活码分享给了下游企业 +// ErrCode710653 试用到期超过30天,试用期间的会话内容存档已失效 // // 排查方法: - -const ErrCode701055 ErrCode = 701055 +const ErrCode710653 ErrCode = 710653 -// ErrCode701056 总分享激活码数超上下游通讯录人数2倍 +// ErrCode710654 付费到期超过30天,付费期间的会话内容存档已失效 // // 排查方法: - -const ErrCode701056 ErrCode = 701056 +const ErrCode710654 ErrCode = 710654 -// ErrCode701057 服务商没有授权上游企业 +// ErrCode710655 授权了有多个版本的存档范围,不允许迁移 // // 排查方法: - -const ErrCode701057 ErrCode = 701057 +const ErrCode710655 ErrCode = 710655 -// ErrCode701058 来源企业和目标企业没有上下游关系 +// ErrCode710656 迁入目标应用已经设置了公钥,不允许迁移 // // 排查方法: - -const ErrCode701058 ErrCode = 701058 +const ErrCode710656 ErrCode = 710656 -// ErrCode701070 无效的自动激活状态 +// ErrCode710657 其他应用在迁移中,只能使用该应用继续重试 // // 排查方法: - -const ErrCode701070 ErrCode = 701070 +const ErrCode710657 ErrCode = 710657 -// ErrCode701071 从未为授权企业购买过接口许可 +// ErrCode710658 已经迁移过了 // // 排查方法: - -const ErrCode701071 ErrCode = 701071 +const ErrCode710658 ErrCode = 710658 -// ErrCode701081 更新激活码的时候写冲突,请获取激活码最新详情再根据激活码最新情况处理 +// ErrCode710659 第三方存档接口还未设置公钥 // // 排查方法: - -const ErrCode701081 ErrCode = 701081 +const ErrCode710659 ErrCode = 710659 -// ErrCode701082 该用户已经激活的情况下,使用新码重新激活的场景,旧码剩余的时长不能超过20天 +// ErrCode710671 调试凭证已过期 // // 排查方法: - -const ErrCode701082 ErrCode = 701082 +const ErrCode710671 ErrCode = 710671 -// ErrCode701083 订单未支付 +// ErrCode710672 服务商非测试企业或应用非测试授权安装,不允许使用调试模式 // // 排查方法: - -const ErrCode701083 ErrCode = 701083 +const ErrCode710672 ErrCode = 710672 -// ErrCode701084 订单不是未支付 +// ErrCode710673 模型/程序不在调试模式下 // // 排查方法: - -const ErrCode701084 ErrCode = 701084 +const ErrCode710673 ErrCode = 710673 -// ErrCode701085 订单无法操作,请稍后再试 +// ErrCode710674 调用专区连接失败 // // 排查方法: - -const ErrCode701085 ErrCode = 701085 +const ErrCode710674 ErrCode = 710674 -// ErrCode701086 订单不属于该企业 +// ErrCode710675 调用专区读写超时 // // 排查方法: - -const ErrCode701086 ErrCode = 701086 +const ErrCode710675 ErrCode = 710675 -// ErrCode701087 授权企业没有安装任何互通权限应用(「客户联系」或「微信客服」权限) +// ErrCode710676 专区程序返回的http状态码不为200 // // 排查方法: - -const ErrCode701087 ErrCode = 701087 +const ErrCode710676 ErrCode = 710676 -// ErrCode701088 用户不在服务商应用的可见范围内 +// ErrCode710677 专区解密或者验签失败 // // 排查方法: - -const ErrCode701088 ErrCode = 701088 +const ErrCode710677 ErrCode = 710677 -// ErrCode701089 用户不在服务商互通权限(「客户联系」或「微信客服」权限)应用的可见范围内 +// ErrCode710678 子表数量限制255个、单个子表限制150w格子/20w行/2000列 // // 排查方法: - -const ErrCode701089 ErrCode = 701089 +const ErrCode710678 ErrCode = 710678 -// ErrCode701090 续期订单中全部账号的续期天数都等于0 +// ErrCode730000 非法的tmp_openid // // 排查方法: - -const ErrCode701090 ErrCode = 701090 +const ErrCode730000 ErrCode = 730000 -// ErrCode701099 用户没有有效的接口许可 -// -// 排查方法: [接口许可失效的表现],参考该文档排查是否全部待检查用户都有有效的接口许可 +// ErrCode730001 非法的录制文件id // -// [接口许可失效的表现]: https://developer.work.weixin.qq.com/document/path/90313#38220 -const ErrCode701099 ErrCode = 701099 +// 排查方法: - +const ErrCode730001 ErrCode = 730001 -// ErrCode701120 该接口不支持传父订单id +// ErrCode730002 非法的录制id // // 排查方法: - -const ErrCode701120 ErrCode = 701120 +const ErrCode730002 ErrCode = 730002 -// ErrCode701121 测试企业不允许调用多企业下单接口 +// ErrCode730003 非法的子会议id // // 排查方法: - -const ErrCode701121 ErrCode = 701121 +const ErrCode730003 ErrCode = 730003 -// ErrCode701122 多企业下单接口全部企业无效 +// ErrCode730004 非法的会议号 // // 排查方法: - -const ErrCode701122 ErrCode = 701122 +const ErrCode730004 ErrCode = 730004 -// ErrCode701123 多企业下单接口每个jobid最多关联10万个企业 +// ErrCode730005 不能操作别的应用创建的会议 // // 排查方法: - -const ErrCode701123 ErrCode = 701123 +const ErrCode730005 ErrCode = 730005 -// ErrCode701124 corpid重复 +// ErrCode730006 非法的报名id // // 排查方法: - -const ErrCode701124 ErrCode = 701124 +const ErrCode730006 ErrCode = 730006 -// ErrCode701125 jobid未提交 +// ErrCode730007 企业不是专业版或购买的会议室数量不足10个 // -// 排查方法: - -const ErrCode701125 ErrCode = 701125 +// 排查方法: 参考会议接口文档[概述] +// +// [概述]: https://developer.work.weixin.qq.com/document/path/90313#25775 +const ErrCode730007 ErrCode = 730007 -// ErrCode701126 jobid已提交 +// ErrCode730008 会议已删除 // // 排查方法: - -const ErrCode701126 ErrCode = 701126 +const ErrCode730008 ErrCode = 730008 -// ErrCode701127 客户非测试企业,不能添加测试订单 +// ErrCode730009 会议参与者必须包含管理员 // // 排查方法: - -const ErrCode701127 ErrCode = 701127 +const ErrCode730009 ErrCode = 730009 -// ErrCode701128 客户是测试企业,不能添加非测试订单 +// ErrCode730010 会议不是通过API创建的 // // 排查方法: - -const ErrCode701128 ErrCode = 701128 +const ErrCode730010 ErrCode = 730010 -// ErrCode701129 企业下无服务商的应用订单 +// ErrCode730011 不支持该类型的会议,不是通过API创建的 // // 排查方法: - -const ErrCode701129 ErrCode = 701129 +const ErrCode730011 ErrCode = 730011 -// ErrCode701130 企业下服务商应用订单均已过期 +// ErrCode740000 安全网关gateway_info的冲突 // -// 排查方法: - -const ErrCode701130 ErrCode = 701130 +// 排查方法: 企业内唯一 +const ErrCode740000 ErrCode = 740000 -// ErrCode701131 无应用订单,处于免费试用状态,但购买账号码数超过免费试用的人数上限 +// ErrCode740001 安全网关target_info的path冲突 // -// 排查方法: - -const ErrCode701131 ErrCode = 701131 +// 排查方法: 企业内path唯一 +const ErrCode740001 ErrCode = 740001 -// ErrCode701132 购买时长不大于3个月,购买账号数不允许超过通讯录人数的2倍 +// ErrCode740002 安全网关数量超过上限 // -// 排查方法: - -const ErrCode701132 ErrCode = 701132 +// 排查方法: 企业内最多10个 +const ErrCode740002 ErrCode = 740002 -// ErrCode701133 无应用订单,处于免费试用状态,购买时长不允许超过3个月(93天) +// ErrCode740003 单个安全网关内的path数量超过限制 // -// 排查方法: - -const ErrCode701133 ErrCode = 701133 +// 排查方法: 单个网关内最多100个 +const ErrCode740003 ErrCode = 740003 -// ErrCode701134 操作过于频繁,请稍后再试 +// ErrCode740004 安全网关不存在 // -// 排查方法: - -const ErrCode701134 ErrCode = 701134 +// 排查方法: 可能已被删除 +const ErrCode740004 ErrCode = 740004 -// ErrCode701135 接口许可购买时长不可低于应用订单时长 +// ErrCode740005 安全网关gateway_info的host非域名 // -// 排查方法: - -const ErrCode701135 ErrCode = 701135 +// 排查方法: 目前要求必须是域名,不能配置ip +const ErrCode740005 ErrCode = 740005 -// ErrCode701150 测试企业不支持分配许可 +// ErrCode740006 安全网关gateway_info的host验证失败 +// +// 排查方法: 要求域名ICP备案跟企业主体一致 +const ErrCode740006 ErrCode = 740006 + +// ErrCode751001 企业未开通邮箱高级功能 // // 排查方法: - -const ErrCode701150 ErrCode = 701150 +const ErrCode751001 ErrCode = 751001 -// ErrCode701160 存在未通过支付检查的企业 +// ErrCode751002 企业邮箱高级功能分配余额不足 // // 排查方法: - -const ErrCode701160 ErrCode = 701160 +const ErrCode751002 ErrCode = 751002 -// ErrCode701161 订单已经指定使用微信网银支付 +// ErrCode770001 高级功能额度不足 // // 排查方法: - -const ErrCode701161 ErrCode = 701161 +const ErrCode770001 ErrCode = 770001 -// ErrCode701170 群活码第三方限免许可到期 +// ErrCode770003 高级功能全企业购买模式不允许分配和撤销高级功能账户 // // 排查方法: - -const ErrCode701170 ErrCode = 701170 +const ErrCode770003 ErrCode = 770003 -// ErrCode701200 其他镜像发布中,禁止发布 +// ErrCode770004 不存在合法的用户列表 // // 排查方法: - -const ErrCode701200 ErrCode = 701200 +const ErrCode770004 ErrCode = 770004 -// ErrCode730000 非法的tmp_openid +// ErrCode770005 未开通业务高级功能 // // 排查方法: - -const ErrCode730000 ErrCode = 730000 +const ErrCode770005 ErrCode = 770005 -// ErrCode730001 非法的录制文件id +// ErrCode770006 不合法的jobid // // 排查方法: - -const ErrCode730001 ErrCode = 730001 +const ErrCode770006 ErrCode = 770006 -// ErrCode730002 非法的录制id +// ErrCode770007 任务正在处理中 // // 排查方法: - -const ErrCode730002 ErrCode = 730002 +const ErrCode770007 ErrCode = 770007 -// ErrCode730003 非法的子会议id +// ErrCode770008 存在用户账户分配高级功能超过7天,不允许撤销 // // 排查方法: - -const ErrCode730003 ErrCode = 730003 +const ErrCode770008 ErrCode = 770008 -// ErrCode730004 非法的会议号 +// ErrCode770009 请求中所有合法用户账户均是高级功能账户 // // 排查方法: - -const ErrCode730004 ErrCode = 730004 +const ErrCode770009 ErrCode = 770009 -// ErrCode730005 不能操作别的应用创建的会议 +// ErrCode770010 已在腾讯会议侧购买高级功能,不允许通过此接口操作 // // 排查方法: - -const ErrCode730005 ErrCode = 730005 +const ErrCode770010 ErrCode = 770010 -// ErrCode730006 非法的报名id +// ErrCode770011 不合法的applyid // // 排查方法: - -const ErrCode730006 ErrCode = 730006 +const ErrCode770011 ErrCode = 770011 -// ErrCode730007 企业不是专业版 +// ErrCode770013 仅支持修改API状态下创建的高级功能申请单 // // 排查方法: - -const ErrCode730007 ErrCode = 730007 +const ErrCode770013 ErrCode = 770013 -// ErrCode730008 会议已删除 +// ErrCode770014 高级功能申请单状态冲突 // // 排查方法: - -const ErrCode730008 ErrCode = 730008 +const ErrCode770014 ErrCode = 770014 -// ErrCode730009 会议参与者必须包含管理员 +// ErrCode770015 高级功能审批单审批人信息非法 // // 排查方法: - -const ErrCode730009 ErrCode = 730009 +const ErrCode770015 ErrCode = 770015 -// ErrCode730010 会议不是通过API创建的 +// ErrCode770016 不合法的审批url // // 排查方法: - -const ErrCode730010 ErrCode = 730010 +const ErrCode770016 ErrCode = 770016 -// ErrCode730011 不支持该类型的会议,不是通过API创建的 +// ErrCode770017 当前审批单状态无法更新 // // 排查方法: - -const ErrCode730011 ErrCode = 730011 +const ErrCode770017 ErrCode = 770017 -// ErrCode790000 不合法的jobid +// ErrCode790010 任务不在进行中 // // 排查方法: - -const ErrCode790000 ErrCode = 790000 +const ErrCode790010 ErrCode = 790010 -// ErrCode790001 不合法的任务状态 +// ErrCode790011 不合法的任务类型 // // 排查方法: - -const ErrCode790001 ErrCode = 790001 +const ErrCode790011 ErrCode = 790011 -// ErrCode790002 任务已经在执行 +// ErrCode790012 不合法的json模板 // // 排查方法: - -const ErrCode790002 ErrCode = 790002 +const ErrCode790012 ErrCode = 790012 -// ErrCode790003 任务执行结果已经上报 +// ErrCode790013 不合法的json结果 // // 排查方法: - -const ErrCode790003 ErrCode = 790003 +const ErrCode790013 ErrCode = 790013 -// ErrCode790004 未授权会话组件 +// ErrCode790014 json结果跟模板不匹配 // // 排查方法: - -const ErrCode790004 ErrCode = 790004 +const ErrCode790014 ErrCode = 790014 -// ErrCode790005 nonce重复 +// ErrCode790015 不合法的json请求包 // // 排查方法: - -const ErrCode790005 ErrCode = 790005 +const ErrCode790015 ErrCode = 790015 -// ErrCode790006 没有已发布的镜像 +// ErrCode790016 json请求包跟模板不匹配 // // 排查方法: - -const ErrCode790006 ErrCode = 790006 +const ErrCode790016 ErrCode = 790016 -// ErrCode790007 无法解密消息 +// ErrCode790017 不合法的job_info // // 排查方法: - -const ErrCode790007 ErrCode = 790007 +const ErrCode790017 ErrCode = 790017 -// ErrCode790008 任务不在运行中 +// ErrCode790020 模型或程序与该应用不存在关联关系 // // 排查方法: - -const ErrCode790008 ErrCode = 790008 +const ErrCode790020 ErrCode = 790020 -// ErrCode830001 用于上传临时素材的url非法 +// ErrCode790021 程序不是正常部署状态 // -// 排查方法: 确认url是否支持Range分块下载 -const ErrCode830001 ErrCode = 830001 +// 排查方法: - +const ErrCode790021 ErrCode = 790021 -// ErrCode830002 下载的文件太大,或指定的Range范围太大 +// ErrCode790022 请求的结果包含不合适的内容 // -// 排查方法: 确认下载的文件大小,如果超过20M,需要使用Range分块下载,且分块大小不超过20M -const ErrCode830002 ErrCode = 830002 +// 排查方法: - +const ErrCode790022 ErrCode = 790022 -// ErrCode830003 用过上传临时素材的url下载数据失败 +// ErrCode790023 模型或程序的请求正在执行中 // -// 排查方法: 确认url本身是否能正常访问 -const ErrCode830003 ErrCode = 830003 +// 排查方法: - +const ErrCode790023 ErrCode = 790023 -// ErrCode400218 有参会成员未购买专业版账号 +// ErrCode790024 不能跨应用使用知识库 // // 排查方法: - -const ErrCode400218 ErrCode = 400218 +const ErrCode790024 ErrCode = 790024 -// ErrCode400219 会议发起人未购买专业版账号 +// ErrCode790025 知识库內容中的web_url参数非法 // // 排查方法: - -const ErrCode400219 ErrCode = 400219 +const ErrCode790025 ErrCode = 790025 -// ErrCode400220 创建会议行为异常,被风控策略拦截 +// ErrCode790026 知识库中內容总数超过限制 // // 排查方法: - -const ErrCode400220 ErrCode = 400220 +const ErrCode790026 ErrCode = 790026 -// ErrCode400221 正在进行中或者已经结束的会议不允许更新 +// ErrCode790027 一个企业内的知识库数量超过限制 // // 排查方法: - -const ErrCode400221 ErrCode = 400221 +const ErrCode790027 ErrCode = 790027 -// ErrCode400222 会议开始时间不允许小于当前时间 +// ErrCode790028 不能删除知识库中的全部內容 // // 排查方法: - -const ErrCode400222 ErrCode = 400222 +const ErrCode790028 ErrCode = 790028 -// ErrCode400223 开始时间或者结束时间不合法 +// ErrCode790029 知识库中存在相同的web_url // // 排查方法: - -const ErrCode400223 ErrCode = 400223 +const ErrCode790029 ErrCode = 790029 -// ErrCode400224 会中或者已经结束的会议不能取消 +// ErrCode790032 非法的知识库內容名称 // -// 排查方法: - -const ErrCode400224 ErrCode = 400224 +// 排查方法: 检查doc_name的长度是否过长,后缀是否和文件格式匹配等 +const ErrCode790032 ErrCode = 790032 -// ErrCode400226 企业购买「会议高级功能」后才可以使用该字段 +// ErrCode790033 名字中不能包含不可见字符 // // 排查方法: - -const ErrCode400226 ErrCode = 400226 +const ErrCode790033 ErrCode = 790033 -// ErrCode400227 非法的重复类型 +// ErrCode790034 不能使用已删除的知识库 // // 排查方法: - -const ErrCode400227 ErrCode = 400227 +const ErrCode790034 ErrCode = 790034 -// ErrCode400228 重复次数不合法 +// ErrCode790040 调用模型输入展开后长度过长 // // 排查方法: - -const ErrCode400228 ErrCode = 400228 +const ErrCode790040 ErrCode = 790040 -// ErrCode710400 硬件云端接入设备model_accesstoken非法 +// ErrCode790041 调用模型传入的所有消息内容都获取失败 // // 排查方法: - -const ErrCode710400 ErrCode = 710400 +const ErrCode790041 ErrCode = 790041 -// ErrCode710401 硬件云端接入设备model_accesstoken过期 +// ErrCode800000 不合法的知识库id // -// 排查方法: model_access_token有时效性,需要重新获取一次 -const ErrCode710401 ErrCode = 710401 +// 排查方法: - +const ErrCode800000 ErrCode = 800000 -// ErrCode710402 硬件云端接入设备model_ticket非法 +// ErrCode800001 不合法的模型或程序id // // 排查方法: - -const ErrCode710402 ErrCode = 710402 +const ErrCode800001 ErrCode = 800001 -// ErrCode710403 缺少model_access_token参数 +// ErrCode800002 模型或程序未部署 // // 排查方法: - -const ErrCode710403 ErrCode = 710403 +const ErrCode800002 ErrCode = 800002 -// ErrCode40106 device_access_token非法 +// ErrCode800003 模型或程序的能力id不存在 // // 排查方法: - -const ErrCode40106 ErrCode = 40106 +const ErrCode800003 ErrCode = 800003 -// ErrCode71044 设备已绑定,删除失败 +// ErrCode830001 用于上传临时素材的url非法 // -// 排查方法: 设备绑定情况下,无法取消登记 -const ErrCode71044 ErrCode = 71044 +// 排查方法: 确认url是否支持Range分块下载 +const ErrCode830001 ErrCode = 830001 -// ErrCode71045 operid非法 +// ErrCode830002 下载的文件太大,或指定的Range范围太大 // -// 排查方法: - -const ErrCode71045 ErrCode = 71045 +// 排查方法: 确认下载的文件大小,如果超过20M,需要使用Range分块下载,且分块大小不超过20M +const ErrCode830002 ErrCode = 830002 -// ErrCode71046 无设备数据权限 +// ErrCode830003 用过上传临时素材的url下载数据失败 // -// 排查方法: - -const ErrCode71046 ErrCode = 71046 +// 排查方法: 确认url本身是否能正常访问 +const ErrCode830003 ErrCode = 830003 -// ErrCode71047 openuserid参数非法 +// ErrCode842002 代开发应用模版未上线 // // 排查方法: - -const ErrCode71047 ErrCode = 71047 +const ErrCode842002 ErrCode = 842002 -// ErrCode71048 应用无授权设备 +// ErrCode842003 不是代开发应用模版 // // 排查方法: - -const ErrCode71048 ErrCode = 71048 +const ErrCode842003 ErrCode = 842003 -// ErrCode71049 考勤规则达到通过APP设置的上限 +// ErrCode842004 代开发应用模版数量不合法 // // 排查方法: - -const ErrCode71049 ErrCode = 71049 +const ErrCode842004 ErrCode = 842004 -// ErrCode71050 门禁规则名称非法 +// ErrCode842005 不支持的应用类型 // -// 排查方法: - -const ErrCode71050 ErrCode = 71050 +// 排查方法: 检查应用类型是否与文档说明一致 +const ErrCode842005 ErrCode = 842005 -// ErrCode71051 门禁规则非法 +// ErrCode842006 已存在代开发应用授权 // // 排查方法: - -const ErrCode71051 ErrCode = 71051 +const ErrCode842006 ErrCode = 842006 -// ErrCode71052 获取测温数据错误 +// ErrCode844001 非法的output_file_format // -// 排查方法: - -const ErrCode71052 ErrCode = 71052 +// 排查方法: 判断输出文件格式是否正确 +const ErrCode844001 ErrCode = 844001 -// ErrCode71056 userid不在设备可见范围内 +// ErrCode844002 最近安装应用时间已超过7天,不再允许拨打公费电话联系管理员 // -// 排查方法: - -const ErrCode71056 ErrCode = 71056 +// 排查方法: 请检查最近一次安装应用时间是否超过7天 +const ErrCode844002 ErrCode = 844002 -// ErrCode71057 门禁规则id非法 +// ErrCode845001 openid账号类型不是公众号或小程序 // // 排查方法: - -const ErrCode71057 ErrCode = 71057 +const ErrCode845001 ErrCode = 845001 -// ErrCode71058 userid不在应用可见范围内 +// ErrCode845002 openid认证主体和企业认证主体不一致 // -// 排查方法: - -const ErrCode71058 ErrCode = 71058 +// 排查方法: 请确保小程序或公众号已经认证,且认证的主体名称与企业的主体名称一致 +const ErrCode845002 ErrCode = 845002 -// ErrCode71059 门禁规则的配置范围超过授权应用可见范围,不可删除和修改 +// ErrCode845003 unionid认证主体和企业认证主体不一致 // -// 排查方法: - -const ErrCode71059 ErrCode = 71059 +// 排查方法: 请确保开放平台账号已经认证,且认证的主体名称与企业的主体名称一致 +const ErrCode845003 ErrCode = 845003 -// ErrCode71060 门禁规则的配置范围超过授权应用可见范围,不可删除和修改 +// ErrCode846000 不是代开发或者第三方应用 // // 排查方法: - -const ErrCode71060 ErrCode = 71060 +const ErrCode846000 ErrCode = 846000 -// ErrCode71062 文件名称非法 +// ErrCode2000002 CorpId参数无效 // -// 排查方法: - -const ErrCode71062 ErrCode = 71062 +// 排查方法: 指定的CorpId不存在 +const ErrCode2000002 ErrCode = 2000002 -// ErrCode71063 同时缺少media_id和download_url参数 +// ErrCode2000003 不存在远程开门的数据 // // 排查方法: - -const ErrCode71063 ErrCode = 71063 +const ErrCode2000003 ErrCode = 2000003 -// ErrCode71064 download_url非法或者从download_url下载文件失败 +// ErrCode2000004 远程开门数据记录的设备与当前请求设备不匹配 // // 排查方法: - -const ErrCode71064 ErrCode = 71064 +const ErrCode2000004 ErrCode = 2000004 -// ErrCode71065 硬件不支持打印功能禁止调用 +// ErrCode2000007 远程开门上报开门状态错误 // // 排查方法: - -const ErrCode71065 ErrCode = 71065 +const ErrCode2000007 ErrCode = 2000007 -// ErrCode71066 硬件不支持扫描功能禁止调用 +// ErrCode2000009 门禁扫码开门上报开门operid非法 // // 排查方法: - -const ErrCode71066 ErrCode = 71066 +const ErrCode2000009 ErrCode = 2000009 -// ErrCode71067 打印文件转码配置版本不合法 +// ErrCode2000010 门禁扫码开门上报开门状态错误 // // 排查方法: - -const ErrCode71067 ErrCode = 71067 +const ErrCode2000010 ErrCode = 2000010 -// ErrCode71068 打印文件转码配置版本过期 +// ErrCode2022029 智能表的 行|列|大小 达到上限 // // 排查方法: - -const ErrCode71068 ErrCode = 71068 +const ErrCode2022029 ErrCode = 2022029 -// ErrCode71069 打印文件转码页码不合法 +// ErrCode2022030 不合法的字段标题,重复、为空等 // -// 排查方法: - -const ErrCode71069 ErrCode = 71069 +// 排查方法: 检查标题是否为空、重复 +const ErrCode2022030 ErrCode = 2022030 -// ErrCode71070 userid 不在设备使用范围内 +// ErrCode2022031 ID已经存在 // -// 排查方法: - -const ErrCode71070 ErrCode = 71070 +// 排查方法: 检查视图、字段、记录ID是否已经存在 +const ErrCode2022031 ErrCode = 2022031 -// ErrCode71071 时间戳不合法 +// ErrCode2022032 不合法的视图属性 // -// 排查方法: - -const ErrCode71071 ErrCode = 71071 +// 排查方法: 合法的视图属性,参考:[viewproperty] +// +// [viewproperty]: https://developer.work.weixin.qq.com/document/path/99902#viewproperty +const ErrCode2022032 ErrCode = 2022032 -// ErrCode71072 设备型号未发布,禁止调用此接口 +// ErrCode2022033 不合法的筛选条件 // -// 排查方法: 发布该型号后重试 -const ErrCode71072 ErrCode = 71072 +// 排查方法: 合法的筛选条件,参考:[filterspec] +// +// [filterspec]: https://developer.work.weixin.qq.com/document/path/99902#filterspec +const ErrCode2022033 ErrCode = 2022033 -// ErrCode71075 扫描上传文件授权码不合法 +// ErrCode2022034 不合法的日期值 // -// 排查方法: - -const ErrCode71075 ErrCode = 71075 +// 排查方法: 合法的日期值,参考:[添加记录] +// +// [添加记录]: https://developer.work.weixin.qq.com/document/path/99907 +const ErrCode2022034 ErrCode = 2022034 -// ErrCode71076 禁止修改或者删除默认不可通行规则 +// ErrCode2022035 不合法的关联值 // -// 排查方法: - -const ErrCode71076 ErrCode = 71076 +// 排查方法: 合法的关联值:参考: +const ErrCode2022035 ErrCode = 2022035 -// ErrCode701100 时间戳不合法 +// ErrCode2022037 不合法的地理位置值 // -// 排查方法: 开始时间必须小于结束时间;时间范围不能超过14天;非微盘专业版的企业只能查询90天内的数据 -const ErrCode701100 ErrCode = 701100 +// 排查方法: 合法的地理位置值,参考:[celllocationvalue] +// +// [celllocationvalue]: https://developer.work.weixin.qq.com/document/path/99907#celllocationvalue +const ErrCode2022037 ErrCode = 2022037 -// ErrCode701101 limit大小超过上限1000 +// ErrCode2022040 不合法的字段列属性 // -// 排查方法: - -const ErrCode701101 ErrCode = 701101 +// 排查方法: 合法的字段列属性,参考:[添加字段] +// +// [添加字段]: https://developer.work.weixin.qq.com/document/path/99904 +const ErrCode2022040 ErrCode = 2022040 -// ErrCode701102 查询用户数超过上限100 +// ErrCode2022041 不合法的关联字段列属性 // -// 排查方法: - -const ErrCode701102 ErrCode = 701102 +// 排查方法: 合法的关联字段列属性,参考:[referencefieldproperty] +// +// [referencefieldproperty]: https://developer.work.weixin.qq.com/document/path/99904#referencefieldproperty +const ErrCode2022041 ErrCode = 2022041 -// ErrCode701103 操作类型不合法 +// ErrCode2022043 不合法的地址位置字段列属性 // -// 排查方法: - -const ErrCode701103 ErrCode = 701103 +// 排查方法: 合法的地理位置字段列属性,参考:[locationfieldproperty] +// +// [locationfieldproperty]: https://developer.work.weixin.qq.com/document/path/99904#locationfieldproperty +const ErrCode2022043 ErrCode = 2022043 -// ErrCode701104 操作来源不合法 +// ErrCode2022047 不合法的自动编号字段列属性 // -// 排查方法: - -const ErrCode701104 ErrCode = 701104 +// 排查方法: 合法的自动编号字段列属性,参考:[autonumberfieldproperty] +// +// [autonumberfieldproperty]: https://developer.work.weixin.qq.com/document/path/99904#autonumberfieldproperty +const ErrCode2022047 ErrCode = 2022047 -// ErrCode701105 cursor不合法 +// ErrCode2022048 没有编辑权限 // -// 排查方法: 检查是否企业微信返回的cursor -const ErrCode701105 ErrCode = 701105 +// 排查方法: 确认是否有文档权限和内容权限 +const ErrCode2022048 ErrCode = 2022048 -// ErrCode710200 不合法的运动步数凭证 +// ErrCode2022049 当前视图已被锁定,无法修改视图结构。 // -// 排查方法: - -const ErrCode710200 ErrCode = 710200 +// 排查方法: 确认当前视图的公开级别 +const ErrCode2022049 ErrCode = 2022049 -// ErrCode710201 用户不允许获取运动步数 +// ErrCode2022050 当前视图不可见,无法修改视图结构。 // -// 排查方法: - -const ErrCode710201 ErrCode = 710201 +// 排查方法: 确认当前视图的公开级别 +const ErrCode2022050 ErrCode = 2022050 -// ErrCode751001 企业未开通邮箱高级功能 +// ErrCode2022051 无法修改应用关联的记录 // // 排查方法: - -const ErrCode751001 ErrCode = 751001 +const ErrCode2022051 ErrCode = 2022051 -// ErrCode751002 企业邮箱高级功能分配余额不足 +// ErrCode2022052 最多固定 3 个字段到工具栏 // // 排查方法: - -const ErrCode751002 ErrCode = 751002 +const ErrCode2022052 ErrCode = 2022052 // ErrCode2400001 请求参数错误 // @@ -6692,33 +7905,3 @@ const ErrCode2400007 ErrCode = 2400007 // // 排查方法: - const ErrCode2400008 ErrCode = 2400008 - -// ErrCode400010 block_hint非法 -// -// 排查方法: - -const ErrCode400010 ErrCode = 400010 - -// ErrCode400011 block_hint对应的拦截已过期 -// -// 排查方法: - -const ErrCode400011 ErrCode = 400011 - -// ErrCode400012 不允许通过该block_hint解除拦截 -// -// 排查方法: - -const ErrCode400012 ErrCode = 400012 - -// ErrCode400013 解拦截次数超过限制 -// -// 排查方法: - -const ErrCode400013 ErrCode = 400013 - -// ErrCode400301 5分钟内有相同的会议正在创建中,暂不可再创建 -// -// 排查方法: 若相同的会议未创建成功,可于相同会议首次创建时间5分钟后重新创建 -const ErrCode400301 ErrCode = 400301 - -// ErrCode400302 相同的会议已经创建成功 -// -// 排查方法: 若明确需要创建相同的会议,可在创建会议请求包中设置"skip_duplicate_check":true 跳过重复会议检查 -const ErrCode400302 ErrCode = 400302