dev --- 3.8.0.A版本, openProject引用 ; formao-live --- 3.7.0.B 版本, formallProject引用
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

59 wiersze
1.4 KiB

  1. package chanjarster.weixin.bean.custom;
  2. import chanjarster.weixin.api.WxConsts;
  3. import chanjarster.weixin.bean.WxCustomMessage;
  4. /**
  5. * 视频消息builder
  6. * <pre>
  7. * 用法: WxCustomMessage m = WxCustomMessage.VOICE()
  8. * .media_id(...)
  9. * .title(...)
  10. * .thumb_media_id(..)
  11. * .description(..)
  12. * .touser(...)
  13. * .build();
  14. * </pre>
  15. * @author chanjarster
  16. *
  17. */
  18. public final class VideoBuilder extends BaseBuilder<VideoBuilder> {
  19. private String media_id;
  20. private String title;
  21. private String description;
  22. private String thumb_media_id;
  23. public VideoBuilder() {
  24. this.msgtype = WxConsts.CUSTOM_MSG_VIDEO;
  25. }
  26. public VideoBuilder media_id(String media_id) {
  27. this.media_id = media_id;
  28. return this;
  29. }
  30. public VideoBuilder title(String title) {
  31. this.title = title;
  32. return this;
  33. }
  34. public VideoBuilder description(String description) {
  35. this.description = description;
  36. return this;
  37. }
  38. public VideoBuilder thumb_media_id(String thumb_media_id) {
  39. this.thumb_media_id = thumb_media_id;
  40. return this;
  41. }
  42. public WxCustomMessage build() {
  43. WxCustomMessage m = super.build();
  44. m.setMedia_id(this.media_id);
  45. m.setTitle(title);
  46. m.setDescription(description);
  47. m.setThumb_media_id(thumb_media_id);
  48. return m;
  49. }
  50. }