All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.chanjar.weixin.cp.bean.outxmlbuilder.BaseBuilder Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package me.chanjar.weixin.cp.bean.outxmlbuilder;

import me.chanjar.weixin.cp.bean.WxCpXmlOutMessage;

public abstract class BaseBuilder {
  
  protected String toUserName;
  
  protected String fromUserName;
  
  public BuilderType toUser(String touser) {
    this.toUserName = touser;
    return (BuilderType) this;
  }
  
  public BuilderType fromUser(String fromusername) {
    this.fromUserName = fromusername;
    return (BuilderType) this;
  }

  public abstract ValueType build();
  
  public void setCommon(WxCpXmlOutMessage m) {
    m.setToUserName(this.toUserName);
    m.setFromUserName(this.fromUserName);
    m.setCreateTime(System.currentTimeMillis() / 1000l);
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy