-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
【企业微信】新增创建企业群发API接口支持tag_filter参数设置。 #3920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
The head ref may contain hidden characters: "\u4F01\u4E1A\u5FAE\u4FE1\u521B\u5EFA\u7FA4\u804A\u4F1A\u8BDD"
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
| import me.chanjar.weixin.cp.bean.external.msg.Attachment; | ||
| import me.chanjar.weixin.cp.bean.external.msg.TagFilter; | ||
| import me.chanjar.weixin.cp.bean.external.msg.Text; | ||
| import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; | ||
|
|
||
|
|
@@ -43,6 +44,12 @@ public class WxCpMsgTemplate implements Serializable { | |
| @SerializedName("chat_id_list") | ||
| private List<String> chatIdList; | ||
|
|
||
| /** | ||
| * 要进行群发的客户标签列表,同组标签之间按或关系进行筛选,不同组标签按且关系筛选,每组最多指定100个标签,支持规则组标签 | ||
| */ | ||
| @SerializedName("tag_filter") | ||
| private TagFilter tagFilter; | ||
|
Comment on lines
+47
to
+51
|
||
|
|
||
| /** | ||
| * 发送企业群发消息的成员userid,当类型为发送给客户群时必填 | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package me.chanjar.weixin.cp.bean.external.msg; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.Data; | ||
|
|
||
| import java.io.Serializable; | ||
| import java.util.List; | ||
|
|
||
| /** | ||
| * 群发的客户标签 | ||
| * | ||
| * @author <a href="https://github.com/Winnie-by996">Winnie</a> | ||
| */ | ||
| @Data | ||
| public class TagFilter implements Serializable { | ||
| private static final long serialVersionUID = -6756444546744020234L; | ||
|
|
||
| @SerializedName("group_list") | ||
| private List<TagList> groupList; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package me.chanjar.weixin.cp.bean.external.msg; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.Data; | ||
|
|
||
| import java.io.Serializable; | ||
| import java.util.List; | ||
|
|
||
| /** | ||
| * 客户标签列表 | ||
| * | ||
| * @author <a href="https://github.com/Winnie-by996">Winnie</a> | ||
| */ | ||
| @Data | ||
| public class TagList implements Serializable { | ||
| private static final long serialVersionUID = 1133054307780310675L; | ||
|
|
||
| @SerializedName("tag_list") | ||
| private List<String> tagList; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
根据官方“创建企业群发”文档,
sender/external_userid/tag_filter不能同时为空,且当指定external_userid时tag_filter不生效。建议在tagFilter(以及相关字段)的注释中补充这些约束,避免调用方误用。Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.