You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
package message
|
|
|
|
|
|
|
|
|
|
type BaseReq struct {
|
|
|
|
|
// 指定接收消息的成员,成员ID列表(多个接收者用‘|’分隔,最多支持1000个)。特殊情况:指定为@all, 则向关注该企业应用的全部成员发送
|
|
|
|
|
Touser string `json:"touser"`
|
|
|
|
|
|
|
|
|
|
// 指定接收消息的部门,多个接收者用‘|’分隔,最多支持100个。当touser为@all时忽略本参数
|
|
|
|
|
Toparty string `json:"toparty"`
|
|
|
|
|
|
|
|
|
|
// 指定接收消息的标签,多个接收者用‘|’分隔,最多支持100个。当touser为@all时忽略本参数
|
|
|
|
|
Totag string `json:"totag"`
|
|
|
|
|
|
|
|
|
|
// 消息类型
|
|
|
|
|
Msgtype string `json:"msgtype"`
|
|
|
|
|
|
|
|
|
|
// 企业应用的id,整型。
|
|
|
|
|
Agentid int `json:"agentid"`
|
|
|
|
|
|
|
|
|
|
// 表示是否开启重复消息检查,0表示否,1表示是,默认0
|
|
|
|
|
EnableDuplicateCheck int `json:"enable_duplicate_check"`
|
|
|
|
|
|
|
|
|
|
// 表示是否重复消息检查的时间间隔,默认1800s,最大不超过4小时
|
|
|
|
|
DuplicateCheckInterval int `json:"duplicate_check_interval"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Resp struct {
|
|
|
|
|
Errcode int `json:"errcode"` // 返回码
|
|
|
|
|
Errmsg string `json:"errmsg"` // 对返回码的文本描述内容
|
|
|
|
|
Invaliduser string `json:"invaliduser"` // 不合法的userid,不区分大小写,统一转为小写
|
|
|
|
|
Invalidparty string `json:"invalidparty"` // 不合法的partyid
|
|
|
|
|
Invalidtag string `json:"invalidtag"` // 不合法的标签id
|
|
|
|
|
Unlicenseduser string `json:"unlicenseduser"` // 没有基础接口许可(包含已过期)的userid
|
|
|
|
|
Msgid string `json:"msgid"` // 消息id,用于撤回应用消息
|
|
|
|
|
|
|
|
|
|
// 仅消息类型为“按钮交互型”,“投票选择型”和“多项选择型”的模板卡片消息返回,应用可使用response_code调用更新模版卡片消息接口,72小时内有效,且只能使用一次
|
|
|
|
|
ResponseCode string `json:"response_code"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Req interface {
|
|
|
|
|
name() string
|
|
|
|
|
}
|