update 补充状态

This commit is contained in:
zlzw 2024-03-22 10:12:28 +08:00
parent 7167ad8e97
commit 61dcf0916d
2 changed files with 21 additions and 1 deletions

View File

@ -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 +
'}';
}
}

View File

@ -47,6 +47,10 @@ public class MessageSayHiNotifyManager {
.getMessageSayHiStartTimer(new HttpCallback<MessageSayHiStartBean>() {
@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();