me.chanjar.weixin.cp.bean.messagebuilder.TextBuilder Maven / Gradle / Ivy
package me.chanjar.weixin.cp.bean.messagebuilder;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.cp.bean.WxCpMessage;
/**
* 文本消息builder
*
* 用法: WxCustomMessage m = WxCustomMessage.TEXT().content(...).toUser(...).build();
*
* @author Daniel Qian
*
*/
public final class TextBuilder extends BaseBuilder {
private String content;
public TextBuilder() {
this.msgType = WxConsts.CUSTOM_MSG_TEXT;
}
public TextBuilder content(String content) {
this.content = content;
return this;
}
public WxCpMessage build() {
WxCpMessage m = super.build();
m.setContent(this.content);
return m;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy