mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-09-24 13:03:46 +08:00
32 lines
699 B
Java
32 lines
699 B
Java
![]() |
package chanjarster.weixin.bean.custom;
|
||
|
|
||
|
import chanjarster.weixin.api.WxConsts;
|
||
|
import chanjarster.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 media_id(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;
|
||
|
}
|
||
|
}
|