群发消息增加isSendAll属性及相关方法,用于显式指定是否群发消息至所有用户

This commit is contained in:
Binary Wang
2017-01-11 17:52:48 +08:00
parent 4264eb2df7
commit 8e831ac961
2 changed files with 16 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ public class WxMpMassTagMessageGsonAdapter implements JsonSerializer<WxMpMassTag
JsonObject messageJson = new JsonObject();
JsonObject filter = new JsonObject();
if (null == message.getTagId()) {
if (message.isSendAll() || null == message.getTagId()) {
filter.addProperty("is_to_all", true);
} else {
filter.addProperty("is_to_all", false);