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

me.chanjar.weixin.mp.bean.datacube.WxDataCubeArticleTotal Maven / Gradle / Ivy

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

import java.util.List;

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

/**
 * 图文分析数据接口返回结果对象.
 * Created by Binary Wang on 2016/8/24.
 *
 * @author Binary Wang
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class WxDataCubeArticleTotal extends WxDataCubeBaseResult {
  private static final long serialVersionUID = -7634365687303052699L;

  /**
   * msgid.
   * 请注意:这里的msgid实际上是由msgid(图文消息id,这也就是群发接口调用后返回的msg_data_id)和index(消息次序索引)组成, 例如12003_3, 其中12003是msgid,即一次群发的消息的id; 3为index,假设该次群发的图文消息共5个文章(因为可能为多图文),3表示5个中的第3个
   */
  @SerializedName("msgid")
  private String msgId;

  /**
   * title.
   * 图文消息的标题
   */
  @SerializedName("title")
  private String title;

  /**
   * details.
   * 详细信息
   */
  @SerializedName("details")
  private List details;

  public static List fromJson(String json) {
    return WxMpGsonBuilder.create().fromJson(
      GsonParser.parse(json).get("list"),
      new TypeToken>() {
      }.getType());
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy