dev --- 3.8.0.A版本, openProject引用 ; formao-live --- 3.7.0.B 版本, formallProject引用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
702 B

  1. package me.chanjar.weixin.bean.custombuilder;
  2. import me.chanjar.weixin.api.WxConsts;
  3. import me.chanjar.weixin.bean.WxCustomMessage;
  4. /**
  5. * 获得消息builder
  6. * <pre>
  7. * 用法: WxCustomMessage m = WxCustomMessage.IMAGE().media_id(...).touser(...).build();
  8. * </pre>
  9. * @author chanjarster
  10. *
  11. */
  12. public final class ImageBuilder extends BaseBuilder<ImageBuilder> {
  13. private String media_id;
  14. public ImageBuilder() {
  15. this.msgtype = WxConsts.CUSTOM_MSG_IMAGE;
  16. }
  17. public ImageBuilder mediaId(String media_id) {
  18. this.media_id = media_id;
  19. return this;
  20. }
  21. public WxCustomMessage build() {
  22. WxCustomMessage m = super.build();
  23. m.setMedia_id(this.media_id);
  24. return m;
  25. }
  26. }