mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
#1050 客服消息支持发送菜单消息
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package me.chanjar.weixin.mp.builder.kefu;
|
||||
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.mp.bean.kefu.WxMpKefuMessage;
|
||||
|
||||
/**
|
||||
* 卡券消息builder
|
||||
* <pre>
|
||||
* 用法: WxMpKefuMessage m = WxMpKefuMessage.WXCARD().cardId(...).toUser(...).build();
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
*/
|
||||
public final class WxMsgMenuBuilder extends BaseBuilder<WxMsgMenuBuilder> {
|
||||
private String headContent;
|
||||
private String tailContent;
|
||||
private String[] msgMenuList;
|
||||
|
||||
public WxMsgMenuBuilder() {
|
||||
this.msgType = WxConsts.KefuMsgType.MSGMENU;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMpKefuMessage build() {
|
||||
WxMpKefuMessage m = super.build();
|
||||
m.setHeadContent(this.headContent);
|
||||
m.setMsgMenuList(this.msgMenuList);
|
||||
m.setTailContent(this.tailContent);
|
||||
return m;
|
||||
}
|
||||
|
||||
public WxMsgMenuBuilder headContent(String headContent) {
|
||||
this.headContent = headContent;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WxMsgMenuBuilder tailContent(String tailContent) {
|
||||
this.tailContent = tailContent;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WxMsgMenuBuilder msgMenuList(String... msgMenuList) {
|
||||
this.msgMenuList = msgMenuList;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user