mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-09-24 04:53:50 +08:00
规范package,为发布到maven central repository做准备
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package me.chanjar.weixin.bean.custombuilder;
|
||||
|
||||
import me.chanjar.weixin.api.WxConsts;
|
||||
import me.chanjar.weixin.bean.WxCustomMessage;
|
||||
|
||||
/**
|
||||
* 获得消息builder
|
||||
* <pre>
|
||||
* 用法: WxCustomMessage m = WxCustomMessage.IMAGE().media_id(...).touser(...).build();
|
||||
* </pre>
|
||||
* @author chanjarster
|
||||
*
|
||||
*/
|
||||
public final class ImageBuilder extends BaseBuilder<ImageBuilder> {
|
||||
private String media_id;
|
||||
|
||||
public ImageBuilder() {
|
||||
this.msgtype = WxConsts.CUSTOM_MSG_IMAGE;
|
||||
}
|
||||
|
||||
public ImageBuilder mediaId(String media_id) {
|
||||
this.media_id = media_id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WxCustomMessage build() {
|
||||
WxCustomMessage m = super.build();
|
||||
m.setMedia_id(this.media_id);
|
||||
return m;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user