me.chanjar.weixin.mp.builder.outxml.BaseBuilder Maven / Gradle / Ivy
package me.chanjar.weixin.mp.builder.outxml;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
public abstract class BaseBuilder {
protected String toUserName;
protected String fromUserName;
@SuppressWarnings("unchecked")
public BuilderType toUser(String touser) {
this.toUserName = touser;
return (BuilderType) this;
}
@SuppressWarnings("unchecked")
public BuilderType fromUser(String fromusername) {
this.fromUserName = fromusername;
return (BuilderType) this;
}
public abstract ValueType build();
public void setCommon(WxMpXmlOutMessage m) {
m.setToUserName(this.toUserName);
m.setFromUserName(this.fromUserName);
m.setCreateTime(System.currentTimeMillis() / 1000L);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy