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

me.chanjar.weixin.mp.bean.template.WxMpTemplate Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package me.chanjar.weixin.mp.bean.template;

import java.io.Serializable;
import java.util.List;

import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import lombok.Data;
import me.chanjar.weixin.common.util.json.GsonParser;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;

/**
 * 
 * 模板列表信息
 * Created by Binary Wang on 2016-10-17.
 * 
* * @author Binary Wang */ @Data public class WxMpTemplate implements Serializable { private static final long serialVersionUID = -7366474522571199372L; /** * template_id. * 模板ID */ @SerializedName("template_id") private String templateId; /** * title. * 模板标题 */ @SerializedName("title") private String title; /** * primary_industry. * 模板所属行业的一级行业 */ @SerializedName("primary_industry") private String primaryIndustry; /** * deputy_industry. * 模板所属行业的二级行业 */ @SerializedName("deputy_industry") private String deputyIndustry; /** * content. * 模板内容 */ @SerializedName("content") private String content; /** * example. * 模板示例 */ @SerializedName("example") private String example; public static List fromJson(String json) { return WxMpGsonBuilder.create().fromJson(GsonParser.parse(json).get("template_list"), new TypeToken>() { }.getType()); } @Override public String toString() { return WxMpGsonBuilder.create().toJson(this); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy