mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
公众平台增加群发接口对原创校验逻辑的支持
This commit is contained in:
@@ -1,28 +1,29 @@
|
||||
package me.chanjar.weixin.mp.bean;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
/**
|
||||
* openid列表群发的消息
|
||||
*
|
||||
*
|
||||
* @author chanjarster
|
||||
*/
|
||||
public class WxMpMassOpenIdsMessage implements Serializable {
|
||||
private static final long serialVersionUID = -8022910911104788999L;
|
||||
|
||||
|
||||
private List<String> toUsers = new ArrayList<>();
|
||||
private String msgType;
|
||||
private String content;
|
||||
private String mediaId;
|
||||
private boolean sendIgnoreReprint = false;
|
||||
|
||||
public WxMpMassOpenIdsMessage() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
public String getMsgType() {
|
||||
return this.msgType;
|
||||
}
|
||||
@@ -86,4 +87,15 @@ public class WxMpMassOpenIdsMessage implements Serializable {
|
||||
this.toUsers = toUsers;
|
||||
}
|
||||
|
||||
public boolean isSendIgnoreReprint() {
|
||||
return sendIgnoreReprint;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sendIgnoreReprint 文章被判定为转载时,是否继续进行群发操作。
|
||||
*/
|
||||
public void setSendIgnoreReprint(boolean sendIgnoreReprint) {
|
||||
this.sendIgnoreReprint = sendIgnoreReprint;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,29 @@
|
||||
package me.chanjar.weixin.mp.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 按标签群发的消息
|
||||
*
|
||||
*
|
||||
* @author chanjarster
|
||||
*/
|
||||
public class WxMpMassTagMessage implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = -6625914040986749286L;
|
||||
private Long tagId;
|
||||
private String msgtype;
|
||||
private String msgType;
|
||||
private String content;
|
||||
private String mediaId;
|
||||
private boolean sendIgnoreReprint = false;
|
||||
|
||||
public WxMpMassTagMessage() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getMsgtype() {
|
||||
return this.msgtype;
|
||||
|
||||
public String getMsgType() {
|
||||
return this.msgType;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,10 +36,11 @@ public class WxMpMassTagMessage implements Serializable {
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts#MASS_MSG_VOICE}
|
||||
* 如果msgtype和media_id不匹配的话,会返回系统繁忙的错误
|
||||
* </pre>
|
||||
* @param msgtype
|
||||
*
|
||||
* @param msgType 消息类型
|
||||
*/
|
||||
public void setMsgtype(String msgtype) {
|
||||
this.msgtype = msgtype;
|
||||
public void setMsgType(String msgType) {
|
||||
this.msgType = msgType;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
@@ -67,10 +69,23 @@ public class WxMpMassTagMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 如果不设置则就意味着发给所有用户
|
||||
* @param tagId
|
||||
*
|
||||
* @param tagId 标签id
|
||||
*/
|
||||
public void setTagId(Long tagId) {
|
||||
this.tagId = tagId;
|
||||
}
|
||||
|
||||
public boolean isSendIgnoreReprint() {
|
||||
return sendIgnoreReprint;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param sendIgnoreReprint 文章被判定为转载时,是否继续进行群发操作。
|
||||
*/
|
||||
public void setSendIgnoreReprint(boolean sendIgnoreReprint) {
|
||||
this.sendIgnoreReprint = sendIgnoreReprint;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package me.chanjar.weixin.mp.bean.result;
|
||||
|
||||
import me.chanjar.weixin.common.util.ToStringUtils;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -7,19 +8,15 @@ import java.io.Serializable;
|
||||
/**
|
||||
* <pre>
|
||||
* 群发消息一发送就返回的结果
|
||||
*
|
||||
*
|
||||
* 真正的群发消息是否发送成功要看
|
||||
* http://mp.weixin.qq.com/wiki/index.php?title=高级群发接口#.E4.BA.8B.E4.BB.B6.E6.8E.A8.E9.80.81.E7.BE.A4.E5.8F.91.E7.BB.93.E6.9E.9C
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
* @author chanjarster
|
||||
*
|
||||
*/
|
||||
public class WxMpMassSendResult implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4816336807575562818L;
|
||||
private String errorCode;
|
||||
private String errorMsg;
|
||||
@@ -64,7 +61,7 @@ public class WxMpMassSendResult implements Serializable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WxMassSendResult [errcode=" + this.errorCode + ", errmsg=" + this.errorMsg + ", msg_id=" + this.msgId + "]";
|
||||
return ToStringUtils.toSimpleString(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user