diff --git a/common/src/main/java/com/yunbao/common/bean/NewLevelModel.java b/common/src/main/java/com/yunbao/common/bean/NewLevelModel.java index 4b666f6c1..abc884d0d 100644 --- a/common/src/main/java/com/yunbao/common/bean/NewLevelModel.java +++ b/common/src/main/java/com/yunbao/common/bean/NewLevelModel.java @@ -1,5 +1,7 @@ package com.yunbao.common.bean; +import android.text.TextUtils; + import com.google.gson.annotations.SerializedName; /** @@ -9,9 +11,9 @@ public class NewLevelModel extends BaseModel { @SerializedName("id") private String id; - @SerializedName("levemin") + @SerializedName("levelmin") private String levemin; - @SerializedName("levemax") + @SerializedName("levelmax") private String levemax; @SerializedName("thumb") private String thumb; @@ -30,10 +32,16 @@ public class NewLevelModel extends BaseModel { } public int getLeveMin() { + if (TextUtils.isEmpty(levemin)) { + levemin = "0"; + } return Integer.parseInt(levemin); } public int getLeveMax() { + if (TextUtils.isEmpty(levemax)) { + levemax = "0"; + } return Integer.parseInt(levemax); }