mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-23 13:06:54 +08:00
去掉模版消息里无用的topcolor参数
This commit is contained in:
parent
3ed717a448
commit
6cf7b08897
@ -1,18 +1,20 @@
|
||||
package me.chanjar.weixin.mp.bean.template;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
/**
|
||||
* 参考 http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433751277&token=&lang=zh_CN 发送模板消息接口部分
|
||||
*/
|
||||
public class WxMpTemplateMessage implements Serializable {
|
||||
private static final long serialVersionUID = 5063374783759519418L;
|
||||
|
||||
private String toUser;
|
||||
private String templateId;
|
||||
private String url;
|
||||
private String topColor;
|
||||
private List<WxMpTemplateData> data = new ArrayList<>();
|
||||
|
||||
public String getToUser() {
|
||||
@ -39,14 +41,6 @@ public class WxMpTemplateMessage implements Serializable {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getTopColor() {
|
||||
return this.topColor;
|
||||
}
|
||||
|
||||
public void setTopColor(String topColor) {
|
||||
this.topColor = topColor;
|
||||
}
|
||||
|
||||
public List<WxMpTemplateData> getData() {
|
||||
return this.data;
|
||||
}
|
||||
@ -71,7 +65,6 @@ public class WxMpTemplateMessage implements Serializable {
|
||||
private String toUser;
|
||||
private String templateId;
|
||||
private String url;
|
||||
private String topColor;
|
||||
private List<WxMpTemplateData> data = new ArrayList<>();
|
||||
|
||||
public WxMpTemplateMessageBuilder toUser(String toUser) {
|
||||
@ -89,11 +82,6 @@ public class WxMpTemplateMessage implements Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public WxMpTemplateMessageBuilder topColor(String topColor) {
|
||||
this.topColor = topColor;
|
||||
return this;
|
||||
}
|
||||
|
||||
public WxMpTemplateMessageBuilder data(List<WxMpTemplateData> data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
@ -103,7 +91,6 @@ public class WxMpTemplateMessage implements Serializable {
|
||||
this.toUser(origin.toUser);
|
||||
this.templateId(origin.templateId);
|
||||
this.url(origin.url);
|
||||
this.topColor(origin.topColor);
|
||||
this.data(origin.data);
|
||||
return this;
|
||||
}
|
||||
@ -113,7 +100,6 @@ public class WxMpTemplateMessage implements Serializable {
|
||||
m.toUser = this.toUser;
|
||||
m.templateId = this.templateId;
|
||||
m.url = this.url;
|
||||
m.topColor = this.topColor;
|
||||
m.data = this.data;
|
||||
return m;
|
||||
}
|
||||
|
@ -28,9 +28,6 @@ public class WxMpTemplateMessageGsonAdapter implements JsonSerializer<WxMpTempla
|
||||
if (message.getUrl() != null) {
|
||||
messageJson.addProperty("url", message.getUrl());
|
||||
}
|
||||
if (message.getTopColor() != null) {
|
||||
messageJson.addProperty("topcolor", message.getTopColor());
|
||||
}
|
||||
|
||||
JsonObject data = new JsonObject();
|
||||
messageJson.add("data", data);
|
||||
|
Loading…
Reference in New Issue
Block a user