2014-08-25 11:01:09 +08:00
|
|
|
|
package chanjarster.weixin.bean;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import chanjarster.weixin.api.WxConsts;
|
|
|
|
|
import chanjarster.weixin.util.json.WxGsonBuilder;
|
|
|
|
|
|
|
|
|
|
/**
|
2014-08-25 14:11:26 +08:00
|
|
|
|
* OpenId列表群发的消息
|
2014-08-25 11:01:09 +08:00
|
|
|
|
*
|
|
|
|
|
* @author chanjarster
|
|
|
|
|
*/
|
2014-08-25 14:11:26 +08:00
|
|
|
|
public class WxMassOpenIdsMessage {
|
2014-08-25 11:01:09 +08:00
|
|
|
|
|
2014-08-25 17:19:27 +08:00
|
|
|
|
private List<String> touser = new ArrayList<String>();
|
|
|
|
|
private String msgtype;
|
|
|
|
|
private String content;
|
|
|
|
|
private String media_id;
|
2014-08-25 11:01:09 +08:00
|
|
|
|
|
2014-08-25 14:11:26 +08:00
|
|
|
|
public WxMassOpenIdsMessage() {
|
2014-08-25 11:01:09 +08:00
|
|
|
|
super();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getMsgtype() {
|
|
|
|
|
return msgtype;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <pre>
|
|
|
|
|
* 请使用
|
|
|
|
|
* {@link WxConsts#MASS_MSG_IMAGE}
|
|
|
|
|
* {@link WxConsts#MASS_MSG_NEWS}
|
|
|
|
|
* {@link WxConsts#MASS_MSG_TEXT}
|
|
|
|
|
* {@link WxConsts#MASS_MSG_VIDEO}
|
|
|
|
|
* {@link WxConsts#MASS_MSG_VOICE}
|
|
|
|
|
* </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 getMedia_id() {
|
|
|
|
|
return media_id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setMedia_id(String media_id) {
|
|
|
|
|
this.media_id = media_id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String toJson() {
|
|
|
|
|
return WxGsonBuilder.INSTANCE.create().toJson(this);
|
|
|
|
|
}
|
|
|
|
|
|
2014-08-25 14:11:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* OpenId列表,最多支持10,000个
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2014-08-25 11:01:09 +08:00
|
|
|
|
public List<String> getTouser() {
|
|
|
|
|
return touser;
|
|
|
|
|
}
|
|
|
|
|
|
2014-08-25 14:11:26 +08:00
|
|
|
|
/**
|
|
|
|
|
* 添加OpenId,最多支持10,000个
|
|
|
|
|
* @param openId
|
|
|
|
|
*/
|
|
|
|
|
public void addUser(String openId) {
|
|
|
|
|
this.touser.add(openId);
|
2014-08-25 11:01:09 +08:00
|
|
|
|
}
|
|
|
|
|
}
|