mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
#470 增加小程序模板配置相关接口
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package cn.binarywang.wx.miniapp.bean.template;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class WxMaTemplateAddResult implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = 872250961973834465L;
|
||||
|
||||
@SerializedName("template_id")
|
||||
private String templateId;
|
||||
|
||||
public static WxMaTemplateAddResult fromJson(String json){
|
||||
return WxGsonBuilder.create().fromJson(json, WxMaTemplateAddResult.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package cn.binarywang.wx.miniapp.bean.template;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WxMaTemplateLibraryGetResult implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = -190847592776636744L;
|
||||
private String id;
|
||||
private String title;
|
||||
@SerializedName("keyword_list")
|
||||
private List<KeywordInfo> keywordList;
|
||||
|
||||
@Data
|
||||
public static class KeywordInfo{
|
||||
|
||||
@SerializedName("keyword_id")
|
||||
private int keywordId;
|
||||
private String name;
|
||||
private String example;
|
||||
}
|
||||
|
||||
public static WxMaTemplateLibraryGetResult fromJson(String json){
|
||||
return WxGsonBuilder.create().fromJson(json, WxMaTemplateLibraryGetResult.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.binarywang.wx.miniapp.bean.template;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WxMaTemplateLibraryListResult implements Serializable{
|
||||
private static final long serialVersionUID = -2780782521447602209L;
|
||||
|
||||
@SerializedName("total_count")
|
||||
private int totalCount;
|
||||
private List<TemplateItem> list;
|
||||
|
||||
public static WxMaTemplateLibraryListResult fromJson(String json){
|
||||
return WxGsonBuilder.create().fromJson(json, WxMaTemplateLibraryListResult.class);
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class TemplateItem{
|
||||
|
||||
private String id;
|
||||
private String title;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.binarywang.wx.miniapp.bean.template;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WxMaTemplateListResult implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = -7430535579782184537L;
|
||||
private List<TemplateInfo> list;
|
||||
|
||||
public static WxMaTemplateListResult fromJson(String json){
|
||||
return WxGsonBuilder.create().fromJson(json, WxMaTemplateListResult.class);
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class TemplateInfo{
|
||||
|
||||
@SerializedName("template_id")
|
||||
private String templateId;
|
||||
private String title;
|
||||
private String content;
|
||||
private String example;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user