update 补充状态
This commit is contained in:
parent
7167ad8e97
commit
61dcf0916d
@ -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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user