mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
消息群发的预览接口
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package me.chanjar.weixin.mp.bean;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author miller
|
||||
*/
|
||||
public class WxMpMassPreviewMessage implements Serializable {
|
||||
private String toWxUsername;
|
||||
private String msgType;
|
||||
private String content;
|
||||
private String mediaId;
|
||||
|
||||
public WxMpMassPreviewMessage() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getToWxUsername() {
|
||||
return toWxUsername;
|
||||
}
|
||||
|
||||
public void setToWxUsername(String toWxUsername) {
|
||||
this.toWxUsername = toWxUsername;
|
||||
}
|
||||
|
||||
public String getMsgType() {
|
||||
return msgType;
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 请使用
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts#MASS_MSG_IMAGE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts#MASS_MSG_NEWS}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts#MASS_MSG_TEXT}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts#MASS_MSG_VIDEO}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts#MASS_MSG_VOICE}
|
||||
* 如果msgtype和media_id不匹配的话,会返回系统繁忙的错误
|
||||
* </pre>
|
||||
*
|
||||
* @param msgType
|
||||
*/
|
||||
public void setMsgType(String msgType) {
|
||||
this.msgType = msgType;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getMediaId() {
|
||||
return mediaId;
|
||||
}
|
||||
|
||||
public void setMediaId(String mediaId) {
|
||||
this.mediaId = mediaId;
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return WxMpGsonBuilder.INSTANCE.create().toJson(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user