WxMpUserList里total类型改为long #176

This commit is contained in:
Binary Wang 2017-04-10 10:53:58 +08:00
parent bc0fbf76a5
commit 89470660ef
2 changed files with 4 additions and 4 deletions

View File

@ -12,14 +12,14 @@ import java.util.List;
*/ */
public class WxMpUserList { public class WxMpUserList {
protected int total = -1; protected long total = -1;
protected int count = -1; protected int count = -1;
protected List<String> openids = new ArrayList<>(); protected List<String> openids = new ArrayList<>();
protected String nextOpenid; protected String nextOpenid;
public int getTotal() { public long getTotal() {
return this.total; return this.total;
} }
public void setTotal(int total) { public void setTotal(long total) {
this.total = total; this.total = total;
} }
public int getCount() { public int getCount() {

View File

@ -20,7 +20,7 @@ public class WxUserListGsonAdapter implements JsonDeserializer<WxMpUserList> {
public WxMpUserList deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { public WxMpUserList deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
JsonObject o = json.getAsJsonObject(); JsonObject o = json.getAsJsonObject();
WxMpUserList wxMpUserList = new WxMpUserList(); WxMpUserList wxMpUserList = new WxMpUserList();
wxMpUserList.setTotal(GsonHelper.getInteger(o, "total")); wxMpUserList.setTotal(GsonHelper.getLong(o, "total"));
wxMpUserList.setCount(GsonHelper.getInteger(o, "count")); wxMpUserList.setCount(GsonHelper.getInteger(o, "count"));
wxMpUserList.setNextOpenid(GsonHelper.getString(o, "next_openid")); wxMpUserList.setNextOpenid(GsonHelper.getString(o, "next_openid"));
if (o.get("data") != null && !o.get("data").isJsonNull() && !o.get("data").getAsJsonObject().get("openid").isJsonNull()) { if (o.get("data") != null && !o.get("data").isJsonNull() && !o.get("data").getAsJsonObject().get("openid").isJsonNull()) {