com.foxinmy.weixin4j.wxa.api.TemplateListResult Maven / Gradle / Ivy
The newest version!
package com.foxinmy.weixin4j.wxa.api;
import java.util.List;
import com.alibaba.fastjson.TypeReference;
import com.foxinmy.weixin4j.exception.WeixinException;
import com.foxinmy.weixin4j.model.paging.Pageable;
import com.foxinmy.weixin4j.model.paging.Pagedata;
import com.foxinmy.weixin4j.wxa.model.template.Template;
class TemplateListResult extends WxaApiResult {
private static final long serialVersionUID = 2018052602L;
public static final TypeReference TYPE_REFERENCE
= new TypeReference() {
};
private List list;
private Long totalCount;
public List getList() {
return list;
}
public void setList(List list) {
this.list = list;
}
public Long getTotalCount() {
return totalCount;
}
public void setTotalCount(Long totalCount) {
this.totalCount = totalCount;
}
public Pagedata toPage(Pageable pageable) throws WeixinException {
this.checkErrCode();
final Pagedata page = new Pagedata(
pageable,
this.getTotalCount().intValue(),
this.getList()
);
return page;
}
public List toList() throws WeixinException {
this.checkErrCode();
return this.getList();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy