From 939675fe58bb1745b9b5715bfe0e10affc88e094 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 8 Nov 2022 17:40:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E5=AD=97=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/bean/NewLevelModel.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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); }