diff --git a/common/src/main/java/com/yunbao/common/bean/MessageSayHiStartBean.java b/common/src/main/java/com/yunbao/common/bean/MessageSayHiStartBean.java index 37d571ac5..1aa44b4d7 100644 --- a/common/src/main/java/com/yunbao/common/bean/MessageSayHiStartBean.java +++ b/common/src/main/java/com/yunbao/common/bean/MessageSayHiStartBean.java @@ -5,7 +5,7 @@ import com.google.gson.annotations.SerializedName; public class MessageSayHiStartBean extends BaseModel{ @SerializedName("time") private int nextTime; - + private int status; public int getNextTime() { return nextTime; } @@ -13,4 +13,20 @@ public class MessageSayHiStartBean extends BaseModel{ public void setNextTime(int nextTime) { this.nextTime = nextTime; } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + @Override + public String toString() { + return "MessageSayHiStartBean{" + + "nextTime=" + nextTime + + ", status=" + status + + '}'; + } } diff --git a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java index 918e5daa2..b728a5b2b 100644 --- a/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java +++ b/common/src/main/java/com/yunbao/common/utils/MessageSayHiNotifyManager.java @@ -47,6 +47,10 @@ public class MessageSayHiNotifyManager { .getMessageSayHiStartTimer(new HttpCallback() { @Override public void onSuccess(MessageSayHiStartBean data) { + if(data.getStatus()==0){ + Log.i(TAG, "onSuccess: 初始化定时器,定时器关:" + data.toString()); + return; + } timer = new Timer(); timer.schedule(createTask(), data.getNextTime() * 1000L); hiBean = new MessageSayHiBean();