From 61dcf0916d8f22ba68e6f737c35e198a9303955f Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 22 Mar 2024 10:12:28 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=A1=A5=E5=85=85=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/bean/MessageSayHiStartBean.java | 18 +++++++++++++++++- .../utils/MessageSayHiNotifyManager.java | 4 ++++ 2 files changed, 21 insertions(+), 1 deletion(-) 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();