me.chanjar.weixin.mp.builder.kefu.MpNewsArticleBuilder Maven / Gradle / Ivy
package me.chanjar.weixin.mp.builder.kefu;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.mp.bean.kefu.WxMpKefuMessage;
/**
* 图文消息builder
*
* 用法:
* WxMpKefuMessage m = WxMpKefuMessage.MPNEWSARTICLE().articleId("xxxxx").toUser(...).build();
*
*
* @author JCLee
*/
public final class MpNewsArticleBuilder extends BaseBuilder{
private String articleId;
public MpNewsArticleBuilder() {
this.msgType = WxConsts.KefuMsgType.MP_NEWS_ARTICLE;
}
public MpNewsArticleBuilder articleId(String articleId) {
this.articleId = articleId;
return this;
}
@Override
public WxMpKefuMessage build() {
WxMpKefuMessage m = super.build();
m.setMpNewsArticleId(this.articleId);
return m;
}
}