mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
issue #24 模板消息接口
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package me.chanjar.weixin.mp.bean;
|
||||
|
||||
/**
|
||||
* @author Daniel Qian
|
||||
*/
|
||||
public class WxMpTemplateData {
|
||||
|
||||
private String name;
|
||||
private String value;
|
||||
private String color;
|
||||
|
||||
public WxMpTemplateData() {
|
||||
}
|
||||
|
||||
public WxMpTemplateData(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public WxMpTemplateData(String name, String value, String color) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package me.chanjar.weixin.mp.bean;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by qianjia on 14/11/1.
|
||||
*/
|
||||
public class WxMpTemplateMessage {
|
||||
|
||||
private String toUser;
|
||||
private String templateId;
|
||||
private String url;
|
||||
private String topColor;
|
||||
private List<WxMpTemplateData> datas = new ArrayList<WxMpTemplateData>();
|
||||
|
||||
public String getToUser() {
|
||||
return toUser;
|
||||
}
|
||||
|
||||
public void setToUser(String toUser) {
|
||||
this.toUser = toUser;
|
||||
}
|
||||
|
||||
public String getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public void setTemplateId(String templateId) {
|
||||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getTopColor() {
|
||||
return topColor;
|
||||
}
|
||||
|
||||
public void setTopColor(String topColor) {
|
||||
this.topColor = topColor;
|
||||
}
|
||||
|
||||
public List<WxMpTemplateData> getDatas() {
|
||||
return datas;
|
||||
}
|
||||
|
||||
public void setDatas(List<WxMpTemplateData> datas) {
|
||||
this.datas = datas;
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return WxMpGsonBuilder.INSTANCE.create().toJson(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user