-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MaterialListBean and associated class
- Loading branch information
1 parent
e37b26d
commit 377d127
Showing
3 changed files
with
314 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* | ||
*/ | ||
package com.halo.wechat.capabilities.beans; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* 图文消息内容 | ||
* | ||
* @author Junior | ||
* @date 2015年10月14日 下午10:57:55 | ||
* @version 1.0 | ||
* @since | ||
* @see | ||
*/ | ||
public class Content { | ||
|
||
private List<NewsItem> news_item; | ||
|
||
/** | ||
* @return 多图文消息会在此处有多篇文章 | ||
*/ | ||
public List<NewsItem> getNews_item() { | ||
return news_item; | ||
} | ||
|
||
/** | ||
* @param news_item | ||
* 多图文消息会在此处有多篇文章 | ||
*/ | ||
public void setNews_item(List<NewsItem> news_item) { | ||
this.news_item = news_item; | ||
} | ||
|
||
} |
125 changes: 125 additions & 0 deletions
125
src/com/halo/wechat/capabilities/beans/MaterialListBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
/** | ||
* | ||
*/ | ||
package com.halo.wechat.capabilities.beans; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* 通过永久素材查询接口获得的永久素材列表 | ||
* | ||
* @author Junior | ||
* @date 2015年10月14日 下午10:29:23 | ||
* @version 1.0 | ||
* @since | ||
* @see | ||
*/ | ||
public class MaterialListBean extends ResultBean { | ||
|
||
public class Item { | ||
|
||
private int media_id; | ||
|
||
private Content content; | ||
|
||
private String update_time; | ||
|
||
/** | ||
* @return 素材id(必须是永久mediaID) | ||
*/ | ||
public int getMedia_id() { | ||
return media_id; | ||
} | ||
|
||
/** | ||
* @param media_id | ||
* 素材id(必须是永久mediaID) | ||
*/ | ||
public void setMedia_id(int media_id) { | ||
this.media_id = media_id; | ||
} | ||
|
||
/** | ||
* @return 图文消息内容 | ||
*/ | ||
public Content getContent() { | ||
return content; | ||
} | ||
|
||
/** | ||
* @param content | ||
* 图文消息内容 | ||
*/ | ||
public void setContent(Content content) { | ||
this.content = content; | ||
} | ||
|
||
/** | ||
* @return 图文消息素材的最后更新时间 | ||
*/ | ||
public String getUpdate_time() { | ||
return update_time; | ||
} | ||
|
||
/** | ||
* @param update_time | ||
* 图文消息素材的最后更新时间 | ||
*/ | ||
public void setUpdate_time(String update_time) { | ||
this.update_time = update_time; | ||
} | ||
|
||
} | ||
|
||
private int total_count; | ||
|
||
private int item_count; | ||
|
||
private List<Item> item; | ||
|
||
/** | ||
* @return 该类型的素材的总数 | ||
*/ | ||
public int getTotal_count() { | ||
return total_count; | ||
} | ||
|
||
/** | ||
* @param total_count | ||
* 该类型的素材的总数 | ||
*/ | ||
public void setTotal_count(int total_count) { | ||
this.total_count = total_count; | ||
} | ||
|
||
/** | ||
* @return 本次调用获取的素材的数量 | ||
*/ | ||
public int getItem_count() { | ||
return item_count; | ||
} | ||
|
||
/** | ||
* @param item_count | ||
* 本次调用获取的素材的数量 | ||
*/ | ||
public void setItem_count(int item_count) { | ||
this.item_count = item_count; | ||
} | ||
|
||
/** | ||
* @return 可能有多个图文消息item结构 | ||
*/ | ||
public List<Item> getItem() { | ||
return item; | ||
} | ||
|
||
/** | ||
* @param item | ||
* 可能有多个图文消息item结构 | ||
*/ | ||
public void setItem(List<Item> item) { | ||
this.item = item; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
/** | ||
* | ||
*/ | ||
package com.halo.wechat.capabilities.beans; | ||
|
||
/** | ||
* 图文消息素材 | ||
* | ||
* @author Junior | ||
* @date 2015年10月14日 下午10:40:14 | ||
* @version 1.0 | ||
* @since | ||
* @see | ||
*/ | ||
public class NewsItem { | ||
|
||
private String title; | ||
|
||
private int thumb_media_id; | ||
|
||
private byte show_cover_pic; | ||
|
||
private String author; | ||
|
||
private String digest; | ||
|
||
private String content; | ||
|
||
private String url; | ||
|
||
private String content_source_url; | ||
|
||
/** | ||
* @return 图文消息的标题 | ||
*/ | ||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
/** | ||
* @param title | ||
* 图文消息的标题 | ||
*/ | ||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
/** | ||
* @return 图文消息的封面图片素材id(必须是永久mediaID) | ||
*/ | ||
public int getThumb_media_id() { | ||
return thumb_media_id; | ||
} | ||
|
||
/** | ||
* @param thumb_media_id | ||
* 图文消息的封面图片素材id(必须是永久mediaID) | ||
*/ | ||
public void setThumb_media_id(int thumb_media_id) { | ||
this.thumb_media_id = thumb_media_id; | ||
} | ||
|
||
/** | ||
* @return 是否显示封面,0为false,即不显示,1为true,即显示 | ||
*/ | ||
public byte getShow_cover_pic() { | ||
return show_cover_pic; | ||
} | ||
|
||
/** | ||
* @param show_cover_pic | ||
* 是否显示封面,0为false,即不显示,1为true,即显示 | ||
*/ | ||
public void setShow_cover_pic(byte show_cover_pic) { | ||
this.show_cover_pic = show_cover_pic; | ||
} | ||
|
||
/** | ||
* @return 作者 | ||
*/ | ||
public String getAuthor() { | ||
return author; | ||
} | ||
|
||
/** | ||
* @param author | ||
* 作者 | ||
*/ | ||
public void setAuthor(String author) { | ||
this.author = author; | ||
} | ||
|
||
/** | ||
* @return 图文消息的摘要,仅有单图文消息才有摘要,多图文此处为空 | ||
*/ | ||
public String getDigest() { | ||
return digest; | ||
} | ||
|
||
/** | ||
* @param digest | ||
* 图文消息的摘要,仅有单图文消息才有摘要,多图文此处为空 | ||
*/ | ||
public void setDigest(String digest) { | ||
this.digest = digest; | ||
} | ||
|
||
/** | ||
* @return 图文消息的具体内容,支持HTML标签,必须少于2万字符,小于1M,且此处会去除JS | ||
*/ | ||
public String getContent() { | ||
return content; | ||
} | ||
|
||
/** | ||
* @param content | ||
* 图文消息的具体内容,支持HTML标签,必须少于2万字符,小于1M,且此处会去除JS | ||
*/ | ||
public void setContent(String content) { | ||
this.content = content; | ||
} | ||
|
||
/** | ||
* @return 图文页的URL,或者,当获取的列表是图片素材列表时,该字段是图片的URL | ||
*/ | ||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
/** | ||
* @param url | ||
* 图文页的URL,或者,当获取的列表是图片素材列表时,该字段是图片的URL | ||
*/ | ||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
/** | ||
* @return 图文消息的原文地址,即点击“阅读原文”后的URL | ||
*/ | ||
public String getContent_source_url() { | ||
return content_source_url; | ||
} | ||
|
||
/** | ||
* @param content_source_url | ||
* 图文消息的原文地址,即点击“阅读原文”后的URL | ||
*/ | ||
public void setContent_source_url(String content_source_url) { | ||
this.content_source_url = content_source_url; | ||
} | ||
|
||
} |