me.chanjar.weixin.mp.bean.custombuilder.TextBuilder Maven / Gradle / Ivy
package me.chanjar.weixin.mp.bean.custombuilder;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.mp.bean.WxMpCustomMessage;
/**
* 文本消息builder
*
* 用法: WxMpCustomMessage m = WxMpCustomMessage.TEXT().content(...).toUser(...).build();
*
* @author chanjarster
*
*/
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 WxMpCustomMessage build() {
WxMpCustomMessage m = super.build();
m.setContent(this.content);
return m;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy