me.chanjar.weixin.mp.builder.kefu.ImageBuilder Maven / Gradle / Ivy
The newest version!
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.IMAGE().mediaId(...).toUser(...).build();
*
*
* @author chanjarster
*/
public final class ImageBuilder extends BaseBuilder {
private String mediaId;
public ImageBuilder() {
this.msgType = WxConsts.KefuMsgType.IMAGE;
}
public ImageBuilder mediaId(String media_id) {
this.mediaId = media_id;
return this;
}
@Override
public WxMpKefuMessage build() {
WxMpKefuMessage m = super.build();
m.setMediaId(this.mediaId);
return m;
}
}