mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-09-23 12:33:48 +08:00
21 lines
432 B
Java
21 lines
432 B
Java
package me.chanjar.weixin.bean.custombuilder;
|
|
|
|
import me.chanjar.weixin.bean.WxCustomMessage;
|
|
|
|
public class BaseBuilder<T> {
|
|
protected String msgtype;
|
|
protected String toUser;
|
|
|
|
public T toUser(String toUser) {
|
|
this.toUser = toUser;
|
|
return (T) this;
|
|
}
|
|
|
|
public WxCustomMessage build() {
|
|
WxCustomMessage m = new WxCustomMessage();
|
|
m.setMsgtype(this.msgtype);
|
|
m.setTouser(this.toUser);
|
|
return m;
|
|
}
|
|
}
|